Extra Credit: Why XHTML 1.0?

  1. Meaningless markup
  2. Extra Credit
  3. HTML 4.0.1

The two real choices for HTML as I write this are HTML 4.0.1 and XHTML 1.0. Why do I use XHTML? Because XHTML is XML, and the tools for working with XML are more robust and reliable, in my experience, than the tools for working with HTML. When I write a program to take a full web page and return a snippet, I can safely break up the web page based on the XHTML tags starting and ending reliably. This isn’t something I can do with HTML.

When I validate an XHTML web page, I know that the tags begin and end. When I validate an HTML web page, I don’t: HTML validates fine without closing tags. The closing tags for paragraphs and the various list items can be there, but they don’t have to be there. This means that validation won’t tell me that they’re missing. That can make it easier to create web pages using HTML, but it makes it a lot harder to get information out of those pages. It can also cause problems with white space.

I also use XML a lot for passing data back and forth between web applications. So it’s easier for me to think in XHTML.

XHTML 1.1 and XHTML 1.2 appear to have been designed for special purposes and not for general use on the web.

  1. Meaningless markup
  2. Extra Credit
  3. HTML 4.0.1