I’m sure everyone here knows that we cannot serve the pages with the correct MIME type (application/xhtml+xml) for XHTML without breaking IE compatibility, and that any content served with text/html will be parsed as HTML by any browser out there. So if the content is not parsed as XML.
I use a xhtml doctype only for one reason: it helps me find “errors” in my markup in a more stricter way compared to html. Even if my documents are served as text/html
Is there any other benefit to use XHTML 1.0 Strict with content=”text/html; over HTML 4.01 strict at all? At present or and in the future.
- if i’m already writing well formed valid HTML
4.01 strict and - not want to use any extra XHTML
features (SVG, Docbook, MathML, OFX,
etc), - never going to manipulate my XHTML
to XSL(T) - never goint to server document as
application/html+xml
None. You don’t get any of XHTML’s benefits. As far as the browser is concerned, it’s getting weird HTML, not XML. If you want to get the benefits of XML, like extensibility and the stricter parser (if that’s a benefit), you have to serve your page as
application/xhtml+xml, and IE won’t support it. Not to mention XHTML 1.0 is incompatible with 2.0, while HTML will always be future proof.You may want to read this, among many others. In short, only use XHTML if you know you need to, otherwise it’s useless.
XHTML also doesn’t necessarily mean that the browsers will adjust to standards. Don’t worry about the Standards vs Quirks mode stuff, it’s something that has be mantained for backwards compatibility. When a browser encounters a page with a doctype (any doctype, HTML or XHTML), it will try to render it according to standards. It doesn’t mean that it will render it just like the W3C says, it just means that it will try to (and maybe not succeed).