Is XHTML dead? In July, the XHTML2 working group announced it would be dropping the spec and closing the book on XHTML2. That's XHTML with a 2. Not XHTML.

XHTML is alive and well – it's just not getting the overhaul that was intended with XHTML2. If you're a developer or designer who writes markup, then you're possibly already using XHTML 1.0 or 1.1, strict, transitional or otherwise.

I'd also be willing to bet that if you're using it, you're using it to make use of stricter validation rules: lowercase tags, double quoted attributes, self-closing tags (like <br />) and so on – right?

Equally, if you're that type of designer or developer, you're probably also not serving it as true XHTML. Quite simply because Internet Explorer doesn't accept the application/ xhtml+xml mime type at all, which is a requirement for XHTML. This is old news, though.

The new news is that XHTML2 is dead. The idealist recommendation for the web didn't make it. Possibly because of the lack of backward compatibility, possibly for lots of reasons – the web was hot with discussion on the loss of the spec; the why, who and "whoh!".

However, there is hope. If you're the type of person who likes the strict rules of markup design that runs everything carefully through a validator then you'll be over the moon to know two things:

Firstly, HTML5 supports all the lowercase, self-closing tags, double quoted attributes – the works. And if you don't like these things, it supports that too!

Secondly, if you absolutely have to have XHTML in your bag of tricks, XHTML5 will satisfy your thirst. XHTML5 is quite simply HTML5 + XML, ie all the normal rules of XHTML, like no document. write allowed.

For it to be XHTML5, though, you must serve it as application/xml or application/ xhtml+xml (which isn't currently supported in IE). So HTML5 with lovely XHTML-style markup is the way I'll be going.

Before we dive into what's in HTML5 and what we have to do to get it going, though, I want to address the future: 2022. Aside from it being the year Queen Elizabeth II will celebrate her Platinum Jubilee (assuming she's still around), it's the date that's been inappropriately linked with HTML5 in the minds of many in our community. It's wrong.

In fact, HTML5 is ready to use today. So why the confusion? In an interview by Tech Republic, Ian Hickson, the editor of the HTML5 working draft, was asked to give a timeline of the HTML5 recommendation.

Tech republic

One date should have come out of that interview, but another, much further away did instead: 2022 – the date of the final proposed recommendation, which actually translates to: require at least two browsers to completely pass HTML5 test suites.

Let's put this in context of another spec that's taken a very long time: CSS2.1. CSS2.1 is CSS that I'm certain you're familiar with. I'm certain you use it day to day, without any thought as to whether it's a completed spec. Well, it's been in development for over 10 years, and it has only just become a candidate recommendation (23 April 2009).

Even then, it still doesn't have two browsers completely supporting it. Only Internet Explorer 8 supports the full CSS2.1 spec. Did that stop you from using CSS2.1? I suspect not. Will that stop us from using HTML5? It certainly shouldn't.

HTML5 is available and ready to use today. In fact, the really important HTML5 date is October 2009. This is the last call for the HTML5 working draft. That means that issues with the spec, enhancements, bugs, anything – it all needs to be in and submitted and written into the spec for October (although it can go through reiterations, this is the main deadline).

The Web Hypertext Application Technology Working Group (WHATWG) is completely open for anyone to contribute their ideas and suggestions.

WHATWG

At the site, you can sign up to the mailing lists. You can communicate directly using IRC. And there's even a complete log of all the IRC history. It's all available from whatwg.org.

HTML5 in five seconds

So how do you get your markup to validate as HTML5? It's super easy: you change your DOCTYPE from whatever it is now to this:

<!DOCTYPE html>

That's it. It doesn't require anything more than that.

Google is doing it already. Check out its homepage, written all in one line:

<!DOCTYPE html><head ><title>HTML5 - Google Search</ title><script>

Ironically, Google's search page and listings don't validate because of their use of invalid tags – font element for instance – and a number of other errors. But that doesn't matter, because they can take advantage of the HTML5 parsing rules with that doctype (for example: no type attribute on the script element).

Although that's all you need for HTML5 to be triggered, there's a lot more to HTML5 for you to play with. If you want something a little fuller, here's a typical boilerplate for HTML5, which includes the IE shiv (which I'll discuss later) and default HTML5 block styles:

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 /> <title>HTML5 complete</title>
<!--[if IE]> <script src="http://html5shiv.googlecode com/svn/trunk/html5.js"></script> <![endif]-->
<style> article, aside, figure, footer, header, hgroup, menu, nav, section { display: block; } </style>
</head>
<body>
<p>Hello World</p>
</body>
</html>

A note about the style and script elements in HTML5: these both no longer need the type attribute as they default to text/css and text/ javascript respectively, which just helps to remove a little more cruft from our markup.