Although it is going to be a while before HTML5 is fully implemented, and becomes de facto standard, it is important to have in mind its current and future advantages in comparison to HTML4, as well as the main differences.

Here are the main differences between HTML4 and HTML5:

  1. Syntax is simpler in HTML5. Syntax in HTML5 is not as strict as in HTML4 driven with XML (XHTML1). The syntax is compatible with HTML4 and XHTML but not with SGML. Now you only need to declare the document as <!doctype html> and browser will read it as HTML5.
  2. New semantic and structure elements. Many new elements are added into the HTML5 semantic group of elements to support flexibility in the structure of HTML body. Some of the elements are <section>, <article>, <header> or <footer> elements which allow you to mark the area of your document's layout, or <menu> and <menuitem> to help you distinguish menus and toolbars. All those new elements supposed to help search engines crawl our sites better which in turn might produce some SEO points.
  3. New graphic elements. The new <canvas> elements were added in an attempt to keep the third party, such as Flash, out of the HTML documents. Although still far away, this at the might be the reason for plugins to disappear.
  4. New media elements. The new <audio> and <video> elements made embedding as easy as ever. In combination with other media elements added to HTML5, they make powerful tools for creating interactive websites.
  5. New HTML forms. There was a completely new group of form elements, and <input> element attributes.
  6. HTML5 is still work in progress. As mentioned earlier, HMTL 5 is still in the process of being accepted and updated by browsers, as well as it being reviewed and in the future drafts perhaps modified or upgraded. Therefore it is a valid thinking to build pages with HTML4.1 body, while using the HTML5 for enhancing the site's appearance for those browsers that can read it. Therefore build with HTML4, and play with HTML5.

 

›› go to examples ››