HTML5 Quick Learning Guide
Just what you need to know to quickly
move from HTML / XHTML to HTML5
Brought to you by
http://freehtml5templates.com/
Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
HTML5 syntax is compatible with both HTML4 and XHTML1. Want to close
empty elements with a slash? Go for it. Rather not? Then don't. Want to use
lower case? Upper case? Take your pick. In other words, you really don't have
to change the way you handle these things, so don't worry, ok?
HTML5 doctype is much simpler:
New way:
Old ways:
or
Meta charset tag is much simpler:
New way:
Old way:
Divs are now used for styling rather than structure; HTML5 includes several
new structural elements that help define parts of the document. Let's take a
look at the main new structural elements that you'll probably use right away.
(Note that included in the head is an HTML5 shiv that allows us to style elements in IE,
and a basic CSS style is also included so we can help browsers that aren't caught up yet to
render the new block-level elements as block-level elements. For now, it's easiest just to
automatically include them. Understanding why can come later.)
Licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License
Main Structural Elements You'll Use Most Often in HTML5