Thursday 16 June 2011

Welcome back Bold! HTML 5: welcoming the new ...and a return to old ways

Yesterday I went to a techlink session about HTML 5. It was an interesting presentation by Helen Sargen, the Cambridge University webmaster. HTML 5 will be the standard browsers work towards from now on.

HTML 5 is much more forgiving than its most recent predecessor, XHTML 1.0. In xhtml tags had to be lower case, in HTML 5 it won’t matter. Unlike xhtml, tags won’t have to be closed or self closing, they can just be left open. Lots of things will be less rigid than in xhtml and document declarations will be cleaner. I am not convinced that this is a good thing as it will encourage people to write sloppy code (or at least, not encourage the reverse), but it will be of help to those of us whose code is sloppy from time-to-time :)

There are some new tags in HTML 5 which I am really looking forward to using – the whole set of tags relating to forms has been re-written so that form checking, place holder values in fields and lots of other useful stuff can be done without using JavaScript; videos can just be embedded within the new  <video> tags. There are also new tags for navigation, breadcrumbs, headers and footers as well as section and article, to avoid the confusing pile up of </div> tags at the end of a page (if you don’t know what I mean, look at the last few lines of code http://www.lib.cam.ac.uk/) – </section></article> etc is much easier to untangle than </div></div>.

The caveat to all this, of course, is that while all new browsers will be backwards compatible, old browsers won’t have a clue what to do with the new tags. HTML 5 will (mostly) work on IE 9, Firefox 4, and the latest versions of Opera and Safari, but nothing older than that. Therefore, these new tags are essentially useless to us for the next few years, until our users' browsers catch up.

See http://www.w3.org/TR/html5-diff/ for W3C's guide to HTML 5.

Apparently HTML 5 is an evolving standard, new tags are liable to be added all the time.

…Oh and bold is now back in favour, so forget your xhtml <strong> tags and revert to <b> … at least until next time.

No comments:

Post a Comment