<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Test Title</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
Why is two meta tags always go before title and others afterwards?
Is there any reason (compatibility, coding references or rules) I can't place all the meta tags before title?
The browser needs to know the character encoding as soon as possible. Other elements (including the title) can contain characters which only have meaning (or the correct meaning) in the specific encoding being used.
There is no need for any other meta elements to appear before the title.
Is there any reason (compatibility, coding references or rules) I can't place all the meta tags before title?
The sooner the title appears, the sooner the browser can display it (in the title bar, tab, etc).
It's partly un-necessary, but from a strictly theoretical view, it makes sense.
If you consider you first tell the browser it's a <HTML>, document it's dealing with, then that the content/characterset is UTF-8, so then the browser will know how to properly treat the title text, with the correct character set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With