Order of tags in <head></head>

2020-02-17 08:51发布

does it matter at all what order the <link> or <script> or <meta> tags are in in the <head></head>?

(daft question but one of those things i've never given any thought to until now.)

标签: html xhtml
14条回答
The star\"
2楼-- · 2020-02-17 09:25

Nope, it doesn't matter, except for CSS linking or inclusion, because of CSS inheritance and the fact that it overwrite what was already styled (sorry for my english, i think my sentence is not really clear :-/).

查看更多
一夜七次
3楼-- · 2020-02-17 09:26

Put the meta tag that declares the charset as the first element in head. The browser only searches so far for the tag. If you have too much stuff before the meta element, the charset might not get applied.

If you use the BASE element, put it before any elements that load URIs (if desired).

查看更多
登录 后发表回答