HTML 5

What is HTML5?
HTML5 will be the new standard for HTML, XHTML, and the HTML DOM.
The previous version of HTML came in 1999. The web has changed a lot since then.
HTML5 is still a work in progress. However, most modern browsers have some HTML5 support.

How Did HTML5 Get Started?
HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG).
WHATWG was working with web forms and applications, and W3C was working with XHTML 2.0. In 2006, they decided to cooperate and create a new version of HTML.
Some rules for HTML5 were established:

Browser Support:
The latest versions of Safari, Chrome, Firefox, and Opera support some HTML5 features. Internet Explorer 9 will support some HTML5 features.

New Features:
The canvas element for drawing
The video and audio elements for media playback
Better support for local offline storage
New content specific elements, like article, footer, header, nav, section
New form controls, like calendar, date, time, email, url, search

New Elements in HTML5:
The internet has changed a lot since HTML 4.01 became a standard in 1999. Today, some elements in HTML 4.01 are obsolete, never used, or not used the way they were intended to. These elements are deleted or re-written in HTML5. To better handle today's internet use, HTML5 also includes new elements for better structure, drawing, media content, and better form handling.

Video on the Web:
Until now, there has never been a standard for showing video on a web page. Today, most videos are shown through a plugin (like flash). However, not all browsers have the same plugins. HTML5 specifies a standard way to include video, with the video element. The control attribute is for adding play, pause, and volume controls. It is also always a good idea to include the width and height attributes. Insert content between the <video> and </video> tags for browsers that do not support the video element:

Audio on the Web:
Until now, there has never been a standard for playing audio on a web page. Today, most audio are played through a plugin (like flash). However, not all browsers have the same plugins. The example above uses an Ogg file, and will work in Firefox, Opera and Chrome. To make the audio work in Safari, the audio file must be of type MP3 or Wav. The audio element allows multiple source elements. Source elements can link to different audio files. The browser will use the first recognized format.

What is Canvas?
The HTML5 canvas element uses JavaScript to draw graphics on a web page. A canvas is a rectangular area, and you control every pixel of it. The canvas element has several methods for drawing paths, boxes, circles, characters, and adding images.

Storing Data on the Client
HTML5 offers two new methods for storing data on the client:
localStorage - stores data with no time limit
sessionStorage - stores data for one session

Earlier, this was done with cookies. Cookies are not suitable for large amounts of data, because they are passed on by EVERY request to the server, making it very slow and in-effective. In HTML5, the data is NOT passed on by every server request, but used ONLY when asked for. It is possible to store large amounts of data without affecting the website's performance. The data is stored in different areas for different websites, and a website can only access data stored by itself. HTML5 uses JavaScript to store and access the data. HTML5 specifies a standard way to include audio, with the audio element. The audio element can play sound files, or an audio stream.