Continuing on with the meaty third chapter of , I’m delighted to see that we can still represent the structure of a page to HTML beginners this way:
<!-- meta data -->
<!-- document content -->
This essential structure will not change with HTML5.
There are two important bits (one in the HTML tag, and the other within the HEAD) that we need to include.
(1) Inside the HTML tag:
Many of us have been including a bunch of other stuff in there, as called for by XHTML 1.0. No more! That extra stuff is not to be included for HTML5.
If your language is not English, you’ll use something other than “en” ().
(2) Enclosed by the HEAD tags:
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
Many of us have been including this for a long time, but I find a lot of people still not using the UTF-8 character set. (They are using the older ISO-8859-1, which is no longer correct.)
Alternatively, you could use this shorter version for HTML5:
<meta charset=”utf-8″ />
For related posts, check out here in this blog.