HTML5

It certainly seems that HTML5 is starting to take hold with more and more websites launching that make use of HTML5 but how good is it?

Have semantics been improved?

The big selling point of HTML5 from the gurus has been that it will give HTML more semantic meaning but I just don’t believe this claim.

Just how are the <section>, <article>, <aside> et al more semantic than simple <div> tags. I can appreciate that this may make it easier for screen-readers and search engine bots to pick up what the role of content blocks are on each page but personally I would have much preferred a different solution; one whereby <div>s can be given roles e.g.

<div role="nav">

or

<div role="header">

The syntax

As a lover of HTML, it’s really saddens me that the HTML5 allows HTML tags to be written in uppercase, lowercase, with closing tags, without closing tags. Whereas, I don’t much like XML’s habit of completely falling over when it reaches a validation error I do think HTML coders should be encouraged to write HTML in one single standard.

For me, I like the syntax of XHTML because I think it’s better practice and I would have loved to have seen HTML5 adopt that more aggressively.

What I do like

HTML5 is not all about those new tags, it’s supposedly more about improving web apps – and taking a lot of the things we rely upon JavaScript for like date pickers into the browser. For now though, a lot of these bits aren’t available but the good news is that the odd browser is making use of different input types and using <input type="email" /> is a simple change and can really improve usability for iPhone users.

I’m also a fan of being able to wrap block level elements with links which is often a requirement and currently involves some jiggery-pokery to get it to work and validate.

CSS3 – where it’s really at

For me, CSS3, is really the one to watch and as more browsers support CSS3, we’ll be able to cut out extra <div>s and classes like ‘first’, ‘last’, ‘odd’, and ‘even’.

A lot of the post on 2009’s 24 ways revolved around CSS3 and a lot of designers are starting to make use of text-shadow, rgba, box-shadow and border radius to improve their designs.

Summary

Honestly, I’m still not sold on HTML5, I’m yet to see the benefits of it outside of a few of its characteristics but I am building new sites with the new HTML5 doctype and whilst I’m not a fan of some of the new tags, I do think it’s moving in the right direction.

Instead of moaning about HTML5’s inadequacies I should be getting involved by reading the spec and joining in with the mailing list but let’s face it the spec is a snooze-fest and the mailing list, and frankly most online discussions about HTML5, just seem like cliquey arguments for the sake of it.

What do you think?

Are you using HTML5? If yes, to what extent? And if not why not?

6 responses to “HTML5”

  1. I’m a bit like you Phil, there are things I like about it and don’t like so I’m yet to use it commercially and will not be doing so for some time I imagine.

    I love early adopters and their willingness to work through the teething troubles of new standards and technologies but I wont be one this time round (on client work at least).

    I was an early adopter when people were switching from tables to CSS layouts some years back but there was a clear benefit of CSS over tables where as for HTML5 I don’t feel there is that clear discernible benefit I can explain so easily to a client that will justify the following likely head aches that come with doing some “bleeding edge”.

    I’ve learnt the hard way in the past that doing the bleeding edge thing is not always best for you or your client here are just a few of the head aches I can think of:

    * In-house staff are most likley going to be unfamiliar with and confused by it.
    * Existing CMS’s/WYSIWYG’s,Scripts,etc are likely to mess things up and/or cause annoyance by by malforming code, etc.
    * It will take you more time to write and document.

    I’m sure many will make the point about how we’ve all been using CSS 2.1 for years despite the fact that it only become a candidate recommendation in 2009 and its a fair point but that was presentational not structural for a start and people did what I’m going to do this time round and didn’t jump in with two feet, they gradually moved over to tableless layout and no presentational mark up.

    A nice quote I saw picked out was:

    “Implementations and specifications have to do a delicate dance together. You don’t want implementations to happen before the specification is finished, because people start depending on the details of implementations and that constrains the specification. However, you also don’t want the specification to be finished before there are implementations and author experience with those implementations, because you need the feedback. There is unavoidable tension here, but we just have to muddle on through.”

    I going to muddle on through on my personal work and on Airfront’s new site but for client work I will be taking a step back until I’m sure its right to do so, which I think is part of the fun. I’m keen to play and experiment on my personal sites so it will in a couple of years time inform my professional work which is how I think most of us learnt anyway.

  2. The role attribute is part of ARIA, so if you use that together with HTML5 you get the best of both worlds.

    http://www.w3.org/WAI/intro/aria

    I have started using HTML5 on all new projects now – granted, it’s mostly just the doctype at the moment and a few elements that fallback to sensible defaults (like the time element or new input types), but as support becomes more widespread I’ll slowly introduce more and more new pieces.

    • I’ve started slowly to use ARIA attributes on my sites e.g. aria-required=”true” on form elements but I don’t fully understand exactly how ARIA is supposed to work and where/when it should be implemented. The W3C spec document on it – like all W3C spec documents – really hurts my head when I try to read it.

  3. > “As a lover of HTML, it’s really saddens me that the HTML5 allows HTML tags to be written in uppercase, lowercase, with closing tags, without closing tags.”

    Isn’t that a bit of a contradiction? How can you be a lover of HTML and not like the fact tags are case-insensitive, etc? If you had said you were a lover of XML it would make more sense. ;)

    But for me that is the great thing about how they are specing HTML5. They’ve done away with (for the most part) arbitrary rules for the sake of having rules and instead are looking at how HTML is being used in the real-world and attempting to bring the spec inline with use.

    I don’t think I’ll ever be able to write an input without closing it or write my tags in ‘shouty’ UPPERCASE. But I don’t have to I can keep writing it the way I like to, using XHTML syntax (though I do like the idea of doing <input type=’text’ autofocus />)

  4. I use it on personal projects. Unless the client specifically wants it, I wouldn’t suggest it yet because IE needs javascript to display it properly.

    However, all the content is still readable/searchable so it depends how they want it to look without javascript.