Quick HTML5 question

I’ve read that HTML 5 is still a work in progress and not yet an official standard. (Although, the major browsers support many of the new HTML5 elements)

Is it then up to individual developers to decide whether or not they want to use HTML 5 elements on their websites. If a developer uses HTML 5 throughout
their site, is he/she at risk of limiting user experience for those with incompatible browsers?

Any thoughts would be appreciated.

The last time a browser adopted a proposal prior to it becoming a standard was IE5 and CSS2. The actual standard ended up slightly different from what IE5 implemented and Microsoft had to find a way to distinguish between their version (quirks mode) and standards mode.

[font=verdana]One risk, as felgall has said, is that the final spec may look different to the drafts that are being used now, so the code you write today may turn out to be wrong and so may break in some/all browsers – it’s a bigger risk with CSS than HTML, and it’s unlikely to cause major problems, but it’s something to be aware of.

The bigger problem is IE (there’s a surprise :cool:). No browsers will have a major strop if you introduce elements that they don’t understand and fail to do anything at all … most browsers treat unknown elements as inline, and allow you to style them even if they don’t know what the heck they are. You could use <madeuptag> in your code and have madeuptag {color:red;} in your CSS, and most browsers would turn that text red. And of course, for block-level elements such as <section>, you just need to give them display:block; and you’re home and dry. Except … IE doesn’t allow you to do anything with unknown elements, so you can’t apply any styling to them. This is where people start to use things like HTML5shiv and Modernizr, which use Javascript to enable IE to work with those elements. But this is a whole lot of code and processing, and is reliant on the user having Javascript running, which isn’t guaranteed.

So for that reason, I wouldn’t advise using HTML5 elements for the time being. What you can safely use, on the other hand, are HTML5 form element types, which simply degrade gracefully to plain old <input> if the browser doesn’t know what to do with type="email" or whatever else you use.[/font]

Thanks for your thoughts and suggestions.