XHTML no good?
When Dreamweaver MX came out, and gave the option of creating pages in XHTML, the new, stricter, better version of HTML, I jumped right on the bandwagon. Of course, it didn't seem to make much difference about anything, but I religiously checked "Make page XHTML Compliant" with each new page. What an eye opener the below article was for me!!!
I subscribe to the Sitepoint newsletter and I gotta say, it is definitely one of the better ones for a guy in the web development biz. The below quote is from their newsletter but I couldn't find it at their site to link directly to it. Go ahead and peruse their site for the whole article.
I subscribe to the Sitepoint newsletter and I gotta say, it is definitely one of the better ones for a guy in the web development biz. The below quote is from their newsletter but I couldn't find it at their site to link directly to it. Go ahead and peruse their site for the whole article.
The case for avoiding XHTML was pointed out to me by the author of SitePoint's upcoming DHTML book, as I tut-tutted his use of HTML (as opposed to XHTML) for the book's sample code.
Here it is in a nutshell:
Browsers decide how to handle a file based on the MIME type that the server sends with it.
HTML Web pages are identified with a MIME type of text/html.
Pages written in XHTML that are sent with a MIME type of text/html don't benefit from any of the features of XHTML.
To benefit from the features of XHTML, pages must be sent as application/xhtml+xml.
The most popular Web browser (Internet Explorer 6) cannot view pages sent as application/xhtml+xml.
From this, it follows that you cannot benefit from using XHTML without breaking compatibility with Internet Explorer 6. So you might as well just use HTML.
