This is the third installment of a series of blog posts to discuss HTML, XML and XHTML.
A major difference between HTML and XHTML is the manner in which they are interpreted by the browsers. HTML and the browsers having grown up together, browsers tend to be very tolerant of poorly written or outdated HTML constructs. XHTML, on the other hand, is treated very strictly by browsers.
How serious are you about Web standards?
Although it’s just as possible to write high quality HTML as it is to write high quality XHTML, it can be harder to know that you’ve written high quality HTML. Because the browsers “gloss over” many of the problems in HTML code, it often seems that what you’ve written is good HTML. With XHTML this is not the case – browsers reject invalid XHTML without question.
Getting Help to Get There
Of course, in either HTML or XHTML there are tools that can help you. The W3C validator (http://validator.w3.org/) will check any of the six possible schemas of HTML or XHTML. Microsoft’s Visual Studio environment will include warning messages about invalid usages of your selected schema. And Aggiorno (http://www.aggiorno.com) will not only check your documents, it will automatically fix structural and deprecation problems and bring your files up to full XHTML 1.0 compliance.
In Summary
XHTML offers stronger compliance rules with browsers than HTML, along with better tool availability for enforcing that compliance.