Interesting e-mail exchange: HTML vs XHTML

It’s not really a wrestling match, but it is something of a face-off:


Email 1:
Dear Mr Noble:

I am writing a research paper on the difference between HTML and XHTML along with the advantages and disadvantages of the two. I am asking for your opinion because I have learned quite a bit about the languages reading your book HTML, XHTML & CSS for Dummies. From your bio in the book it seems you have a lot of experience and the book itself only proves that. So I was wondering, what is your opinion on HTML vs XHTML? Which is most efficient? Which is, in your opinion, the “best” and why?
One last thing. Do you have any other recommendations for books or sites that can help me with my paper? Any help would be appreciated! Thanks!
-Trinh D, St. Cloud, MN

Email 2:
Hi Trinh,

 Thanks for the email, let me start out by saying I wish I was able to write research papers about HTML when I was in school… I probably would have done a lot better 🙂 That’s awesome. I’m glad you have learned from our book, I’m adding my co-author Ed Tittel as well, maybe he can add his thoughts too?
Give me a few days and I’ll get you some more information, feel free to send any other questions you have.

Email 3:
Dear Trinh:
If you run this google search: “html vs xhtml” (you can leave out the quote marks when you type the string into Google, or it will provide only exact matches to that phrase), you will find lots of interesting information on your chosen topic, including:

1. HTML Versus XHTML (The Web Standards Project)
2. Introduction to XHTML (W3Schools)
3. XHTML vs HTML FAQ (SitePoint)
4. HTML vs. XHTML (WhatWG Wiki)

The basic answer to your question is that XHTML represents a cleaner formulation of HTML that applies the syntax restrictions of XML to HTML markup. Because XML was designed to be easy for computers to parse and humans to read, this confers a considerable advantage over HTML to XHTML in technical terms. But because those technical differences don’t really confer much processing or authoring advantage to humans, people continue to use HTML to this day. Ultimately, it comes mostly down to how much site authors care about the purity of their markup on the one hand, and how much tool developers care about implementing support for XHTML versus support for HTML. Because XHTML hasn’t knocked HTML off its perch, more than a decade after XHTML was introduced, it’s safe to say that HTML keeps marching on. And in fact, that’s why HTML5
includes “HTML” in its name rather than “XHTML,” even though it adheres to XML syntax and thus could be labeled “XHTML” if its designers so chose. That they didn’t choose to do this speaks volumes about the relative importance of HTML, and the perceived meaning and value of XHTML.

One big difference between XHTML and HTML comes from the former’s roots in XML, which is much pickier than HTML about syntax (and about the presence of numerous markup attributes when specific markup elements are used). Ultimately, this means HTML lets content developers “get away with more” in terms of precision, following the rules, and doing things any old way versus “the right way.” In a word, this makes HTML easier to use than XHTML (and this applies to code that generates markup, as well as pages hand-coded by content developers). That’s probably the biggest reason why HTML has continued trucking to this very day, and XHTML remains something of an afterthought…

As for books that address the XHTML versus HTML question, pretty much any good book on XHTML will have to tackle and address this question. Thus, if you visit Amazon and make a book search on the best-reviewed XHTML books, you should find ample resources from which to draw such information.

Hope this helps your research work advance. I also hope you appreciate my reluctance to provide too much information: it’s best if you do your own work to compile and prepare your own research paper. With a school-age son of my own, I understand it’s a good thing to help out, but not so good to do too much of your work for you!

Best wishes,