Do modern browsers care about the DOCTYPE?

前端 未结 5 1348
轮回少年
轮回少年 2020-12-20 16:49

If you use deprecated attributes or tags

, , or etc. in XHTML 1.0 St
5条回答
  •  [愿得一人]
    2020-12-20 17:25

    In most Modern Browsers, you're not going to notice much difference (depending on the page) when using different Doctypes. The biggest difference you'll notice is not in your markup, but in your use of CSS, and the layout/positioning of elements. The Doctype is used when validating your pages, and in determining the mode, the browser renders the page in. So, depending on the Doctype you use, it will determine if the page is rendered in Standards mode, Quirks mode, etc. In IE, and older browsers, you'll notice much more of a difference.

    For a more in-depth information on the subject, check out this link: http://hsivonen.iki.fi/doctype/

提交回复
热议问题