开发者

HTML / XHTML default DTD tag?

开发者 https://www.devze.com 2023-03-07 17:47 出处:网络
I was in a hurry to churn out some html code and did not provide a DTD tag for my index.htm file...does anyone know what DTD is used by default when no tag is provided?

I was in a hurry to churn out some html code and did not provide a DTD tag for my index.htm file...does anyone know what DTD is used by default when no tag is provided?

The reason I ask is that when I add in my chosen type of

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

the page is distorted and I want to go in and fix it. My code 开发者_开发技巧follows the guide lines given for XHTML at

Thanks!


Browsers don't "fake" a doctype they parse in "quirks mode". Quirks mode assumes the web page was written a while ago and never updated, so it attempts to render it in the same way an older version of the browser would have in order to attain backwards compatibility.

In Internet Explorer, rendering in quirks mode makes the page appear the same as it would have in IE 5.5.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号