Part 2 - (X)HTML

The XHTML dilemma

If you use XHTML, you should deliver it with the application/xhtml+xml MIME type. If you do not do so, you should use HTML4 instead of XHTML. The alternative, using XHTML but delivering it as text/html, causes numerous problems that are outlined below.

Unfortunately, IE6 does not support application/xhtml+xml (in fact, it does not support XHTML at all).

Developers have three choices when it comes to using XHTML:

  1. Use XHTML 1.0 with content negotiation - serve the XHTML document as either text/html or application/xhtml+xml depending on the user-agent's capabilities
  2. Use XHTML 1.0 with backward compatibility mode to allow one to use XHTML 1.0 while maintaining compatibility with the legacy browsers. If you follow these guidelines, you are allowed to serve your XHTML as text/html. The backward compatibility mode defines some syntactic tricks which allows an XHTML document to be understood by most HTML browsers.
  3. Use HTML 4.01 Strict or Transitional

External resources: