Let’s get this one cleared up in the first sentence, no you don’t have to wait until 2022 to start using HTML 5! The 2022 date is when HTML5 is supposed to become a “Proposed Recommendation” which means that everyone has agreed on the spec and there are 2 complete implementations. None of that really matters to web developers, what should matter to us is when our users’ browsers support a given feature we are interested in utilizing. There are also clever approaches that allow even our favourite older browsers (think IE 6) to use some of the new features.
The W3C was working on XHTML 2.0, pursuing a clean break from existing markup to create a new language for the web, when a rift formed with a group that felt strongly that it was a mistake to break compatibility with so many web sites. That group split off and formed the WHATWG (Web Hypertext Application Technology Working Group) to pursue enhancements to HTML that provided better support for web applications while remaining backward compatible. The W3C eventually abandoned pursuing XHTML 2.0 and the two groups are once again working together on HTML5. The two main design principles were “Pave the Cowpaths” (standardize already accepted implementations) and “Don’t Reinvent the Wheel” (don’t create new techniques where ones already exist).
<script> tags when it is really the only universally available client language? Why do we still have complicated
<doctypes>? These and several other areas were simplified for HTML5. It doesn’t really add any new capabilities, it just makes life easier.
Conforming and Non-conforming
HTML5 attempted to keep as much compatibility as possible with existing implementations, but there have been minor modifications to some elements. There are elements and attributes that should no longer be used. Most of these should require only minor modifications. A page that follows all of the new rules is said to be “conforming”, while those that don’t are called “non-conforming”.
What exactly happens in a browser that doesn’t support the new HTML5 features? Most browsers just ignore the tags but show styles, etc. IE will not apply any styles and does not update the DOM properly. An elegant solution was provided with the HTML5 shiv which defines the new elements so IE will allow them to be styled and accessed from the DOM. This does not mean that IE will play a
<video> or allow drawing with
New Input Attributes and Elements
One of the exciting areas in HTML5 is the addition of new attributes to the
New Structure Elements
Web sites today are often a bunch of
<div> tags, which tell agents like browsers and search engines very little information about the semantic meaning of areas of the page. After analyzing a large number of web sites, it was obvious that creating new elements like
<footer> could add value to nearly every page on the Internet. These tags provide much more information about a portion of the page, so accessibility tools can see the
Two new media related elements
<video> (which provide what you would expect) may someday reduce reliance on plugins. Both have support for listing multiple video sources, which the browser can choose the first one it knows how to play. It also has support for a fallback mechanism to allow use of Flash or other techniques if the browser can’t use any of the sources. The new elements have standard controls so that users will become accustomed to a particular look and feel which will make it easier for them to use video across multiple web sites.
Web Storage and Offline Web Applications
Cookies have long been the mechanism that web sites used to store some local data on a user’s machine. The problem is that they are very limited in size and get transmitted with all requests to the given web site. HTML5 provides local storage up to 5 MB options for both a browser session and long term. The storage is a set of key/value string pairs. One area where support for this is critical is the new Offline Web Applications support. This provides the ability for web sites to run locally on a user’s machine even when they are not connected to the Internet. For some scenarios, this can provide for a functional application that uses local storage, and synchs up with the server when the user connects to the Internet.
Do you want to learn more? I will be giving a talk called “The Future of the Web: HTML5” at DevWeek 2011 which will go into much more detail including lots of examples. Don’t wait until 2012 or 2022 to start using HTML5, many browsers already have great support for individual features that you can start using today!