Order of tags in <head></head>

前端 未结 14 742
Happy的楠姐
Happy的楠姐 2020-12-24 10:58

does it matter at all what order the or

14条回答
  •  北荒
    北荒 (楼主)
    2020-12-24 11:16

    The accepted answer is kind of wrong, depending on the encoding of the document. If no encoding is sent by in the HTTP header, the browser has to determine the encoding from the document itself.

    If the document uses a declaration to declare its encoding, then any ASCII-valued character (character code < 128) occurring before this statement must be an ASCII value, as per HTML 4 spec. Therefore, it's important that this meta declaration occurs before any other element that may contain non-ASCII characters.

提交回复
热议问题