HTML 5 Tutorial
- Before tackling HTML 5, you should be familiar with the basics of how to write HTML code (see Resources below). HTML is very easy to get the hang of, and once you're familiar with writing code in standards-compliant XHTML (basically just a strict version of basic HTML), you'll find the new features of HTML 5 to be very easy to implement.
- HTML 5 simplifies a lot of the coding practices that were used in earlier versions of HTML. For example, when starting a file, you previously had to begin a document so it looked something like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en ">
This has been simplified to:
<!DOCTYPE html>
<html lang="en">
HTML 5 also simplifies code by getting rid of elements that have fallen out of use or proved to be unhelpful. Because of an array of browser problems, frames will no longer be allowed, and because style sheets handle style better than HTML tags, "presentational" tags like <font>, <center> and <strike> will no longer be valid. - Previously, pages in HTML were usually broken into blocks using <div> tags. Unfortunately, this often resulted in confusing or overly-complicated code:
<div></div>
<div>
<div></div>
</div>
<div></div>
HTML 5 fixes this problem with the new semantic tags <header>, <footer>, <nav>, <content>, <aside>, <article>, <hgroup>, <section>, <address>, <audio> and <video>. These all behave exactly like <div> tags but make the code more readable. The above code can now be rewritten as follows:
<header></header>
<content>
<article></article>
</content>
<footer></footer>
HTML Basics
Simplification
Layout Changes
Source...