dbrimlow Posted September 28, 2007 Share Posted September 28, 2007 Okay, I have finally been convinced of the correct answer to the whole XHTML vs. HTML debate that has been raging for years ... HTML is correct and XHTML is wrong. XHTML may actually become a dinosaur. Here's why. Most of us who thought we were using valid html or xhtml are wrong. Unless you've been using the HTML 4.0 Strict DTD, your code, no matter how well crafted and markup style-free, is NOT valid code ... it "validates" under the Transition DTD, but transitional DTD is not "VALID" HTML. Those of you using HTML transitional, try this. Change transitional to strict. Then test if it is valid at the w3c validation tool. If it validates, get rid of the stupid transitional and keep it as strict. If it doesn't validate, however, promptly remove those cool little "valid html" buttons on the bottom of your page. Now for the real killer. NEITHER XHTML Transitional nor XHTML Strict is valid if it is served using the mime-type "text/html". The w3c says XHTML 1.0 transitional CAN be served with the text/html mime-type, but it is NOT valid XHTML unless it IS served with the "application/xhtml+xml" mime-type. XHTML was abused and never should have had a transitional DTD and it never should have been able to be served under the text/html mime-type. So that brings us back to why I have been converted. I now have to go back to all of those pages that I slaved over for nearly two years, converting from no doctype quirks mode tag-soup to beautifully crafted XHTML transitional - change them all to HTML Strict, re-validate (and subsequently fix) them to be VALID HTML 4.0. Swell, just in time for the new HTML 5.0 and all the debate starting up about THAT!!! Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.