dagblog.
← Archive

XHTML serves a purpose


Yuhůů made his disdain for XHTML clear in a
blog post titled

XHTML Is Pointless
. Let me quote him directly.

In my view, XHTML offers no substantial advantage over HTML unless
you work with XML documents every day, and few people do.
These days XHTML is mostly used to intimidate laypeople.
They have some idea what HTML is, but that initial X in XHTML scares them.
For the moderately informed professional, the acronym is a way to make things
sound complicated and justify charging more. For high school students cobbling
websites together at night, XHTML is an article of faith because, like XML, it starts with X.

Personally, I’m far less skeptical about XHTML. Here’s my simple argument.
XHTML has a purpose. Visitors to your site might not care
whether you use HTML 4.01, HTML 3 or XHTML 1.1. Their main
concern is the content.

There’s a second important point that tends to be forgotten, machine processing. I’m thinking beyond the much-discussed search engines and other intelligent agents. I mean further processing
of the pages themselves. If your pages are valid XHTML documents, they’re also valid
XML documents.

Once you have an XML document, you can work with it further. Use XSL
to transform it into another document format or another kind of XML, such as RSS. You can also analyze
or index it, and so on.

You could of course do some of that with an HTML document, but the range
of possible operations would be much smaller, and they wouldn’t be as efficient. There are lots of tools for working with XML and straightforward ways to do it…

XHTML has a purpose for the people who
make the pages, even if it makes no difference to their visitors.

Medium version

Related articles

Related CZ Podcast episodes