HTML 5.0 Interesting changes

On a slow day at work I finally got time to browse through the changes in the propsed HTML 5.0 standard (Editor’s Draft 6 July 2008). The fith version of HTML will come in two flavours, standard HTML and XHTML. More or less the significant difference is that XHTML will not allow any errors in the XML-structure whereas the HTML-version will render the source as best as it can.

There are some interesting new features incoming by the looks of it, many of them seem influenced by what up until now have been solved using scripts. A quick look at the changes in elements shows us that we are handed the tools to further differenciate between layout and semantic.

Removed Elements
Almost all “legacy”1 layout elements are removed such as BASEFONT, BIG, CENTER, FONT, FRAME, FRAMESET, NOFRAMES, S, STRIKE, TT and U. Most of these are hardly used anymore anyway but I guess there are a few sites out there that will miss the FRAMES-support (allthough IFRAME is still around).  There are a few other removed elements as well; ACRONYM (which is replaced by the aptly named ABBR), APPLET (replaced by EMBED like all other embeded material), DIR (replaced by CSS or simply UL/OL), ISINDEX and XMP.

Added Elements
As previously noted the added elements often reflect semantic structures in HTML. HEADER and FOOTER are two examples, these display as their names implies header and footer information in their current context. This can be used to display chapter headings in a document and other similar information. Also new are the elements ARTICLE and ASIDE which are used to define areas of information in the current document. For example ARTICLE could refer to a single post, a blog entry, a written article or similar and has the ability to stand alone from the rest of the content. An ASIDE is used within an ARTICLE to add information related to the article but to be displayed seperately like in a column next to the main article.

NAV is a new element to mark the navigation of a site. For example “previous” and “next” link are typical navigation elements and should be enclosed in a NAV element.

There are many other new elements in HTML 5.0 but those are beyond the scope of this small review I’m afraid. Read the full HTML 5.0 document for further information.

Changed Attributes and Events
The attribute ACCESSKEY is the only one removed and this is likely due to the addition of the KBD element which replaces it’s functionallity. An interesting addition is DRAGGABLE which is a boolean value which makes an element draggable by the user, this attibute is also followed by several new event types (onDrag, onDragend, onDragenter, onDragleave, onDragover, onDragstart and onDrop). This element togheter with the attribute CONTENTEDITABLE  makes a great couple for future on-line applications.

Other new useful events added in HTML 5.0 are for example onMousewheel, onScroll and onResize which all do what they sound like.

All in all HTML 5.0 is no revolution but adds some convenient elements for more detailed semantic structures within HTML. It also takes out legacy formating elements and suggests the use of CSS to solve all the layout issues. Hopefully the drafts will soon become a new standard because of what I’ve seen so far it looks promising.


1. Wow, this is the first time I’ve used the word legacy in a HTML context! The only other (in)famous element I can think of that was removed is good old BLINK.