Best Markup for text/html

First published on 2006-07-25, updated on 2008-01-11 and again on 2009-03-13.

XHTML sent as text/html can only do what HTML can. Since HTML uses less filesize and is easier to author, it wins.

Analysis

  1. An XHTML 1.0 DOCTYPE cannot cause browsers to use XML.
  2. A processing instruction cannot do that, either.
  3. XHTML 1.0 is limited to the elements and attributes of HTML 4.01.
  4. XHTML is not quite compatible with HTML:
    1. XHTML 1.0 Appendix C is not normative.
    2. XHTML 1.1 is just a Working Draft.
    3. How XHTML 1.1 Customizations work in text/html is undefined.
  5. Mobile browsers don’t use XML parsers.
  6. XHTML Modularisation 1.1 permits legacy markup. It isn’t ‘more semantic’.
  7. HTML has good support and widespread use.
  8. HTML uses less filesize than the equivalent XHTML.
  9. HTML works equally well with CSS.

Recommendation

Use HTML because it is better than XHTML for text/html resources.