XHTML2 is dead as of July 2009. Chances are as a web developer you’ve been using XHTML for sometime, making use of stricter validation rules: lowercase tags, double quoted attributes, self-closing tags etc. Here’s a list of 9 rules:

http://personalweb.about.com/od/basichtml/a/409xhtml.htm

If you’re like me you probably implement web standards but maybe you’re a bit hazy on the specifics. Before we dive into HTML5 maybe now is a good time to refresh your understanding of the Doc Type Definition and why we use it:

http://webdesign.about.com/od/dtds/qt/tipdoctype.htm

Even though you are probably using XHTML you are probably not serving true XHTML because IE doesn’t recognise the xhtml+xml mime type. Ok, so what does this mean?

Well, for a refresher on mime types visit: http://www.boutell.com/newfaq/definitions/mimetype.html

For the official line about the xhtml+xml mime type you should read: http://www.w3.org/TR/xhtml-media-types/

I’ll be honest, I don’t completely understand about mime types and doc types.

Here’s another good resource: http://www.webstandards.org/learn/articles/askw3c/sep2003/

A good discussion about it here: http://www.sitepoint.com/forums/showthread.php?p=4395945

Ok, finally we’re getting somewhere, here’s a more common sense explaination of mime types and DTD’s: http://www.456bereastreet.com/lab/developing_with_web_standards/xhtml/

So, from all that it seems that using real XHTML, application/xhtml+xml, results in IE wanting to download your page as an XML file or to display your source code. If you have access to your web server config files you can test browser capabilities and server the correct mime type accordingly.

Essentially it’s recommended to use HTML 4.01 Strict or XHTML 1.0 Strict doc types.

XHTML 1.1 requires the mime type application/xhtml+xml but as previously mentioned this can cause problems with older browsers.

HTML 5

How do you get your markup to validate in HTML5? Change your DOTYPE from whatever it is tothe following:

<!DOCTYPE html>

What’s new?

We have new tags to help use to structure our web page instead of using multiple div tags.

These include, header, footer, aside, article, nav and section. Have a look at the following page to see what this looks like:

http://www.alistapart.com/articles/previewofhtml5/

HTML5 will also have support for multimedia elements, video, audio with the browser providing a default player to deliver the content rather than using a plugin.

Summary

I’m convinced that HTML5 is the future. But how do I start using it? Do all the browsers support it? Like most things web, we’ll have to start by experimenting and making sure our current site builds don’t break in IE6. As long as our work passes that test then I’m sure we’ll start to see a bigger up take of HTML5. Getting past the basics the future looks promising. There’s lots of new shiney toys to play with including HTML5 Javascript API’s to get to grips with.