I often see this:
<head>
<meta charset="utf-8">
<title>Title</title>
...
</head>
Is it important to put the chartset definition BEFORE the the title tag?
Thanks!
yes it is, see https://code.google.com/p/doctype-mirror/wiki/MetaCharsetAttribute
In order for all browsers to recognize a
<meta charset>
declaration, it must be
- Within the
<head>
element,- Before any elements that contain text, such as the
<title>
element, AND- Within the first 512 bytes of your document, including DOCTYPE and whitespace
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