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

后端 未结 6 1206
心在旅途
心在旅途 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:59

    Note that the HTML specification linked to by Ray is wrong. While whitespace is allowed before the DOCTYPE, the specification says that also comments may come before the DOCTYPE. But that does not work in Internet Explorer 9 and older.

提交回复
热议问题