XHTML vs. HTML Redux
- Michael Carvin
- Jina
- Faruk Ates
- Vidar
Following up my first post on this subject, I have rethought my statement, and think I’ve come to a solid conclusion.
Writing your sites in HTML is passé, just because XHTML is the future. So are XML and XSL. But choosing XHTML requires some knowledge and a lot of rethinking. You may code a client’s site in XHTML 1.1, everything perfectly valid, except for the MIME-type. So you add a correct MIME-type. Your site may still validate, and may even be correct xhtml+xml protocol. Now, on to the very likely to happen disaster. A client may want to have other content on his page. Hiring you again is something he doesn’t want for such a small thing, so he asks a corporate code monkey. The code monkey starts writing his code, perfectly copied from FrontPage 2003, everything in order, nothing to worry about. Upload. “Yellow Screen of Death”. The client gets angry. It should have worked.
This is what Ben de Groot warned me about (indirectly). A client may love the buzzword XHTML and eXtensibility, but in fact the client can’t even edit his own pages unless he’s crafty with X(HT)ML. No way to satisfy a client.
Using XHTML 1.1 with a text/html MIME-type is considered harmful. Nevertheless I use it on my own blog? Why? Conformation. That’s a closed book.
But what about serving up XHTML 1.0 as text/html? I believe I read something about this, and it suits me. It still isn’t perfect, but if a FrontPage-savvy codemonkey pasts his code into the page, nothing errors. The client is happy. Of course, I don’t recommend using text/html for XHTML at all, but if you like XHTML, please do it so it causes the least of harm.
Now, using HTML like Mozilla.org does is a good way, but it isn’t eXtensible. Faruk has a nice post on this, which saves me from explaining it all again.
I have just one thing in my head, quite annoying. Writing HTML is bad, writing XHTML without the correct MIME-type is bad too. I’ve tried to serve this blog up as application/xhtml+xml, but it didn’t work, which was quite ashaming. Now, what should I do? Switch back to HTML 4.01, XHTML 1.0 Strict, or toss in another MIME-type and risking faulty pages? I know my XHTML knowledge fails on a certain level, so help me out, will you? Please do.
Zooiblog