Why beginners may wish to stay away from XHTML in general and why almost everyone should stay away from XHTML 1.0
For most of you it would be easier to just use HTML 4.01 Strict, but for those of you who really want to know, please read:
- Appendix C of the XHTML 1.0 Specification: HTML Compatibility Guidelines.
- A source of much of the confusion and trouble around XHTML on the web.
- Ian Hickson’s Sending XHTML as text/html Considered Harmful
- A good overview of the problems with Appendix C.
- XHTML 1.0, section C14 on the www-html mailing list (November 2006)
- A thread at attempting to get clarity about Appendix C from the W3C and largely failing
- Mozilla’s authoring guidelines
- These recommend against XHTML where HTML would serve.
- The prolog, strict mode, and XHTML in IE
- The current state of Internet Explorer’s XHTML support.
Return to Getting Started guide.
Postscript: when might one want to use XHTML
There two basic advantages to XHTML at the moment that might motivate its use:
- XHTML 1.1 includes a Ruby module for marking up inline annotations in (mostly Oriental) scripts. Unfortunately, Internet Explorer supports bits of Ruby markup in text/html but not application/xhtml+xml and XHTML 1.1 should only ever be served as application/xhtml+xml. No other browser has native support for Ruby, although there is a plugin for Firefox.
- You can combine XHTML with other XML markup languages inline in a standardized fashion. Other XML markup languages include SVG, MathML, and XForms. However, browser support for these other languages is even more patchy than support for XHTML itself. No browser implements XForms natively, Gecko (and a future version of Opera) implement a subset of MathML while Explorer requires a plugin, Gecko, Opera, and WebKit now all have SVG implementations, but again Internet Explorer requires a plugin.