XHTML 1.1 as text/html
20 February 2007
My opinion of XHTML as text/html is not favourable. At best it can be considered an ugly hack, dependent on flaws in HTML parsers to function.
Happily, it was only intended as a transitional thing to let people transfer between HTML 4.01 and XHTML. It is a pity that it didn't work…
Eight years after the publication of XHTML 1.0 and the majority of users are not using a web browser capable of handling it without the author pretending it is HTML. The state is such that the W3C seem to be doing an about face on the future of HTML. I took this as a good sign.
Then I saw the XHTML 1.1 Second Edition Working Draft which led me to write to the working group.
From the new working draft of XHTML 1.1:
XHTML 1.1 documents SHOULD be labeled withthe Internet Media Type text/html as defined in [RFC2854]
Which says:
In addition, [XHTML1] defines a profile of use of XHTML which is compatible with HTML 4.01 and which may also be labeled as text/html.
... making no mention of XHTML 1.1.
or application/xhtml+xml as defined in [RFC3236]. For further information on using media types with XHTML, see the informative note [XHTMLMIME].
Which says:
In general, this media type is NOT suitable for XHTML.
and
The use of 'text/html' for XHTML SHOULD be limited for the purpose of rendering on existing HTML user agents, and SHOULD be limited to [XHTML1] documents which follow the HTML Compatibility Guidelines.
and to paraphrase the summary tables:
XHTML 1.1 SHOULD NOT be served as text/html
Additionally, as far as I know, nothing added in XHTML 1.1 (i.e. Ruby annotation) is supported by legacy user agents. So there seems little point in allowing it to be served as text/html.
I propose the following change:
XHTML 1.1 documents SHOULD be labeled with the Internet Media Type application/xhtml+xml as defined in [RFC3236]. They SHOULD NOT be labeled with the Internet Media Type text/html as defined in [RFC2854]. For further information on using media types with XHTML, see the informative note [XHTMLMIME].