XHTML and Mime Types
The Zen Garden launched as an XHTML 1.1 document. After all, the markup passed XHTML 1.1 validation, so why not use that instead of the older XHTML 1.0 Strict?As it turns out, there's more to XHTML than just closing tags properly. Even if you validate your XHTML, and it does turn out that it's completely valid, it's not technically XHTML unless you're serving it up with the correct MIME type.MIME is a standard for describing information, and the only reason you need to know about it is because the correct MIME type for XHTML is application/xhtml+xml. You can use the far more common text/html, which is also the default for HTML, but only if you're using XHTML 1.0 Transitional or if your XHTML 1.0 Strict is meant to be backward-compatible. You may never serve XHTML 1.1 as text/html; it's always supposed to be served with an XML MIME type.www.webstandards.org/learn/askw3c/sep2003l) and XML.com (www.xml.com/pub/a/2003/03/19/dive-into-xmll).Further, once you turn on the proper MIME type, you trigger XML-parsing in your browser. XML has a rule that says if an error has occurredfor example, a missing </p> tagthe data must stop being parsed and return an error message. You won't even get partial rendering in your browser; you simply won't see your Web page (FIGURE 16). An XML document must be well formed, and that's thatthere's no room for error.