Now in glorious HTML5

March 24th, 2007

From this moment on, Waffle is served in HTML5.

Semantically, this is HTML5 with as much HTML4/XHTML1 as needed to get past the current browsers, and I’m a little bitter about that. There were very few markup changes needed, a testament to HTML5’s progress and ultimate idea. Where XHTML2 is going is ditching almost everything in terms of backwards compatibility but not actually including anything useful in the additions. HTML5 has ditched everything terrifyingly deprecated, kept the rest, and introduced new elements that are truly useful and truly usable.

Examples of those items include <section>, <article>, the tag-team tag team <header> and <footer>, <nav> and <dialog>, which utilizes <dt> and <dd> pairs previously seen only in <dl> (definition lists) to finally standardize written dialog.

Many of these elements would have been tremendous boons to the <div> soup that makes up today’s Waffle. However, major browsers consider the new block elements to be self-closing, self-containing, <br>-like void elements, and this wrecks havoc in the document tree, ruining CSS selectors and other things as a result. So for now, the <div>s will have to stay. It’s not invalid, but it’s a suboptimal use of the specification.

HTML5 keeps some older elements but strip them of any actual special rendering. <hr> is intended to embody a thematic break, rather than its eponym, the horizontal rule, and is void of any noshade attribute, for example. <font>, everyone’s favorite, gets to hang around in another release, but this time as a compatibility crutch for WYSIWYG editors only – everything else is deemed deeply non-conformant. Every detail has been cared for – even XHTML-style /> endings of self-contained tags are compatible with the spec.

HTML5 also brings to the table some order in the anything-goes fields. There’s a recommended ‘feed‘ value for the link attribute rel which designates that the element in question is a feed, leaving the previous standard alternate free to flag the link as also being the alternative to this very page. Predefined classes are suggested for the intention of clearly earmarking various elements on a page – a marvelous idea for an attribute popularly only suggested to serve as a CSS selector hook.

Perhaps most amazingly, HTML5 also specifies a whole lot of other stuff: the DOM (Document Object Model; as used in Javascript and other things) representation of most elements; the tokenization and parsing stage that takes the HTML from text to internal structure inside the browser, ready for processing; the painstaking demands of the modern browser’s capabilities as regards getting from one page to the next and providing full access to the metadata that’s hidden inside a well-constructed HTML5 page; the establishment of a communications interface to provide better network capabilities than the variably-implemented XMLHTTPRequest Javascript object can get you; and perhaps most of all, the ubiquitous striving to specify every important detail where the previous W3C specs just provided a few weakly-phrased sentences in guidance.

There is no doubt in my mind that HTML5 is the thinking man’s way forward in HTML development. The W3C would be wise to just move the WHATWG process over to their domain if they want to get a successful new HTML standard rolling.