In June 2013, Coreservlets.com will be hosting a
live HTML5 training course in Maryland,
developed and taught by David Geary. David is the author of Core HTML5 Canvas (as well as eight best-selling Java texts), is a three-time Java Rock Star at Java One, and has spoken and taught all over the world.

Basic Structure of an HTML5 Document

The following describes the most basic tags needed for a legal HTML5 document. All of
the tags will work in pre-HTML5 browsers, even very old browsers. Click on
the "details" link for an explanation of each element. Please send corrections and suggested improvements to
hall@coreservlets.com.

More Info

The DOCTYPE line is required, and must be the first
line in the document. This simple DOCTYPE will invoke
Standards Mode in all major browsers, even old ones
that were around long before HTML5. Omitting the DOCTYPE or
having anything before it (even a blank line!) will result
in Quirks Mode in many browsers.

More info:

The root element of your document must be "html". Since there is no official language default in HTML5, you should
always specify a language explicitly. This works in all major browsers, including old, pre-HTML5 versions.