2. features of HTML5
1. HTML 5 has simplified syntax. It requires a doctype to be specified to make sure browser renders the page in standards mode. doctype is only needed to enable standards mode for documents written using the HTML syntax Earlier versions of HTML did not require doctype because it HTML language was SGML based and therefore required reference to DTD.
2. HTML5 allows MathML and SVG elements to be used inside a document. These elements can be inserted using math or svg tags.
3. HTML 5 introduces figure element which when combined with <figurecaption> element allow semantically associate captions with their image
4. type attributes are no longer required for link and script tags. It is understood that both of these tags refer to stylesheets and scripts, respectively. So type attribute can be removed all together.
5. Contents can be made editable. A new attribute is contenteditable is introduced which allows user to edit any of the text contained within the element, including its children. One use of this is to make a to do list an example given later in article.
6. A new input type email is introduced. It will only allow strings that conform to a valid email address structure.
7. HTML 5 has introduces <header> and <footer> tags so that it is not required to identify these elements with div tags.
8. Audio files can be added to pages without relying on third party plugins. <audio> tag can be used for this. Firefox will want to see an .ogg file, while Webkit browsers will work just fine with the common .mp3 extension. This means that, at least for now, you should create two versions of the audio. Opera 10 and lower can only work with .wav files.
9. Videos can be added to pages using <video> tags. While Safari, and Internet Explorer 9 can be expected to support video in the H.264 format (which Flash players can play), Firefox and Opera are sticking with the open source Theora and Vorbis formats. As such, when displaying HTML5 video, you must offer both formats.
10. local storage (not officially HTML5, but grouped in for convenience's sake), we can make advanced browsers "remember" what we type, even after the browser is closed or is refreshed. this method work, most notably, in Internet Explorer 8, Safari 4, and Firefox 3.5. Note that, to compensate for older browsers that won't recognize local storage, you should first test to determine whether window.localStorage exists.
12. HTML 5 has Drag and Drop (DnD) API that brings native DnD support to the browser making it much easier to code up.