XHTML, HTML, media types
While the webdesign has been immersed into the new found beauty of standards based design, People in the higher echelons are discussing the merits of XHTML versus HTML and media types.
The discussion can, thanks to some hot IRC-based debating, be summed up by two articles.
Ben de Groot makes a case against XHTML. XHTML is XML based. To make it XML you have to define the document as being "application/xhtml+xml". Almost none of the designers that code XHTML do this. When you actually make sure you use the right type for XHTML, you run into some problems. The XML parser in your favourite browser is very strict. It takes very little to make your page crash horribly, and present you with the horrible 'Yellow screen of death'. A single mistake like a wrongly encoded character or unclosed tag makes sure every visitor only gets a XML error. This makes it very hard for people to develop sites using external content, like Trackbacks or text ads.
Thus it is said we should ignore strict XHTML for websites where these types of content are used.
Concluding: you are left with non well-formed XHTML. Therefore, should you choose to ignore application/xhtml+xml, you would be better off using HTML4.01. Which is just as strict, yet does not require all the XML stuff.
Which begs the question, why use XHTML at all when all problems are solved by using HTML 4.01 (which can be just as strict, tough structurally and semantically sound)?
Faruk Ates offers some interesting insights. Besides the more apparent flexibility of XHTML and some other technical points, he mentions: "Fact of the matter is, XHTML simply is hot, and virtually every company that has heard of Web Standards but has no real knowledge of the Internet considers an XHTML-website to be the hot modern thing to have".
This is quite interesting. I've noticed this myself. Every company that has heard of standards based design, directly links that to XHTML/CSS based design. The myth is people think the new hot design terminologies are all linked. Plain old HTML is quickly forgotten as it represents "The old ways" of table-based design.
Which leaves us with a major problem. Should we encourage unwell formed XHTML? If it helps raise awareness of web standards, I say, why not! For me, XHTML was a stepping stone to all that is new, fresh, exciting in web development. For me, it started a learning process which led me to awareness of the finer points and higher discussions made by validation nuts.
For many people coding HTML 4.01 seems like many a step backward, when they want to use the latest and freshest.
I'll conclude with Faruks final thought: "Sending XHTML as text/html causes no damage or harm anywhere today, as long as your XHTML does validate. And if you want Web Standards to become more and more wide-spread, stick to using XHTML and validate your pages."