You are here:
- Manual
- Development
- Building according to web standards
- XHTML 1.0
- Support and complications
Building according to web standards: Support for XHTML, and complications
Presently, there are three ways to use HTML markup. Read more about MIME types…
- HTML documents that are served by MIME type
text/html.
This is how websites are usually applied. This is the correct way for HTML documents. - XHTML documents that are served by MIME type
text/html.
Browsers will not interpret these documents as XHTML, but as HTML, as the MIME type indicates this. The few XML-specific characteristics of the markup will be ignored (the way a browser does with all markup it doesn't recognise). As the document is interpreted as HTML, any practical benefits pertaining to an XHTML document no langer apply. - XHTML documents served by MIME type
application/xhtml+xml.
This is the correct manner to serve XHTML documents. However, this is also the least common manner, owning to lack of support from some browsers for this MIME type and the inexperience of many web developers with MIME types in general.
The most frequently used web browser at this moment - Microsoft Internet Explorer - does not support XHTML in compliance with form 3. If the document is offered from the server as XHTML (MIME type: application/xhtml+xml), this browser will get bogged down by not displaying this as a web page. That‘s why many web developers make sure that the document is offered as HTML (MIME type: text/html), as in form 2. Browsers that do support XHTML, however, will therefore not interpret and treat the document as XML, but as HTML.
Browsers that currently support XHTML (form 3) will interrupt the display of the document, when there is an error in the markup. This forms a serious obstacle to the accessibility of the document. Errors in the markup should of course be avoided by web developers, but cannot be eliminated totally.
If web developers choose to use XHTML markup, in combination with the correct MIME type, as in form 3, they must ensure that there are never errors in the markup of published information. As this requirement is so stringent, using the MIME type text/html for XHTML files (form 2) is recommended (for the time being) and the MIME type application/xhtml+xml (form 3) is restricted to evaluation and test purposes.
