It's not only good advice, it's the right thing to do. It's technically acceptable to send XHTML 1.0 as 'HTML-compatible' XHTML with a mime-type of text/html. XHTML 1.1, however, should always be served as application/xhtml+xml, as it's an appilcation of XML, not SGML/HTML. XHTML 1.0 should be sent as application/xhtml+xml, but text/html is allowed for backwards compatability with existing user-agents. 99% of sites purporting to be 'XHTML valid' are in fact being interpreted as invalid HTML (closing slashes on <img> etc.).
Be aware that the <meta http-equiv="Content-Type"> tag is not taken notice of if the server's already sending a default mime-type for .htm/.html files, which is very commonplace. Make sure you're sending the right header e.g. with PHP's header() function. Adding the meta-tag alone will likely have no change on the actual mime-type the file's being sent as when served by a webserver.
It's very important to note that there is limited support for the correct XHTML mime-type - notably in all current and future versions of IE (at least up to and including IE7/Win). Therefore you can't support IE when using XHTML 1.1.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.