Does my HTML5 doctype have to be on the VERY first line?

后端 未结 6 1231
心在旅途
心在旅途 2020-12-18 18:32

I\'ve always wondered whether whitespace before a DOCTYPE matters, but I can\'t seem to find any definitive information on the web. People say not to do it,

6条回答
  •  我在风中等你
    2020-12-18 18:41

    There are occasional browsers that have problems with whitespace before the doctype -- the classic example was IE6, which was said to go into quirks mode at the sight of it. Turns out that this is only true for some very specific types of whitespace (non-breakable spaces,   for example). That said, IE6 compatibility is not high on most peoples' priority lists.

提交回复
热议问题