HTML5-ing it up

June 13, 2010 at 4:29 pm
View Comments

Woohoo!

OK, not really. All I did was use the <!DOCTYPE html> doctype. This site doesn’t use any HTML5 features, but it does use some CSS3.

The reason? One web browser treats unknown tags differently to the rest. That browser, Internet Explorer.

Until I found Dive into HTML5. It’s a free “book,” detailing HTML5 changes and even explains how you can HTML5-ify your site. And, it even describes a quirk in IE’s JavaScript that can be used to enable HTML5 components (of course, it means that your site is dependent on JS being turned on).

HTML5 was designed so that older browsers can still parse the document, unfortunately, it depended on functionality that 60% (or so) of the web browsing population don’t have.

You may be wondering why I used the HTML5 doctype then. Well, the answer is simple – it’s easy to remember. One annoyance I had with HTML4 was that if I wanted standards, I had to find a website that listed all the correct doctypes, figure out what I wanted, and pasted that in (yeah, I can’t remember them). HTML5 only has one, and it’s forwards compatible. (Who knows what they’ll do with HTML6, although I guess we won’t find out for another 20 years.)

We have a long way to go yet.

blog comments powered by Disqus