Order of tags in <head></head>

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

does it matter at all what order the or

相关标签:
14条回答
  • 2020-12-24 11:41

    One important thing to note: if you're using the Internet Explorer meta X-UA-Compatible tag to switch rendering modes for IE, it needs to be the first thing in the HEAD:

    <head>
      <meta http-equiv="X-UA-Compatible" content="IE=7" />
      <title>Page title</title>
      ...etc
    </head>
    
    0 讨论(0)
  • 2020-12-24 11:42

    It is usually recommended to have the <script> tag as lower down the page as possible (not in the head but in the body).

    Other than that, I don't think it makes much of a difference because the body cannot be parsed unless you have the <head> section completely loaded. And, you want your <link> tag to be in the head as you want your styling to occur as the browser renders your page and not after that!

    0 讨论(0)
提交回复
热议问题