HTML vs. XHTML
Quite a while back I did a post on HTML document types. In that post I talked about how important it is to declare your document type to avoid quirks mode and random HTML rendering across browsers (i.e. spaghetti code).
At the time I was trying to standardize on using the XHTML strict specification in my code. Getting XHTML strict compliance in your code can be rather daunting. What you are essentially doing is making your code easier for a machine to read - you aren’t really doing a whole lot for yourself per se, and you are still essentially writing HTML. Still, XHTML seemed to be the ultimate successor to the HTML 4.x standard, so I thought I might as well start getting used to it.
Things are starting to shape up differently now, however. XHTML no longer seems to be the heir apparent to HTML, and a group consisting of many of the web browser developers/companies is actively working on a HTML 5.x standard. The main web browser companies are largely ignoring work on the XHTML 2.x spec.
Why this move away from XHTML? From the articles I’ve read, there are a number of reasons:
Starting now I’m going to make all my new web apps conform to the HTML strict specification rather than the XHTML specs unless some startling revelation comes along and flogs me about the head and neck. In a spec-war, I’m going to jump on the bandwagon of the software that actually uses the specs: browsers. And it looks like the major browser companies are shifting their support to HTML.
Have a different idea on XHTML vs HTML? Drop some feedback down below and let me know what you think.
Presuming the machine is an anal-retentive over-caffeinated perfectionist.