Xhtml Development

Many people want to use Xhtml to author their web pages, but are confused about the best ways to deliver those pages in such a way that they will be processed correctly by various user agents. This Note contains suggestions about how to format Xhtml to ensure it is maximally portable, and how to deliver Xhtml to various user agents - even those that do not yet support Xhtml natively. This document is intended to be used by document authors who want to use Xhtml today, but want to be confident that their Xhtml content is going to work in the greatest number of environments. The suggestions in this document are relevant to all Xhtml Family Recommendations at the time of its publication.

In general, 'application/xhtml+xml' should be used for Xhtml Family documents, and the use of 'text/html' should be limited to html-compatible Xhtml Family documents intended for delivery to user agents that do not explicitly state in their HTTP Accept header that they accept 'application/xhtml+xml' [HTTP]. The media types 'application/xml' and 'text/xml' may also be used, but whenever appropriate, 'application/xhtml+xml' or 'text/html' should be used rather than those generic XML media types.

This section summarizes which Internet media type should be used for Xhtml Family documents. Note that while some suggestions are made in this section with regard to content delivery, this section is by no means a comprehensive discussion of content negotiation techniques.