On January 26, 2000, the W3C announced that HTML 4 has been reformulated into XHTML 1.0. XHTML is HTML 4 written as an XML application.
There are two primary parts to XHTML:
- HTML 4
HTML 4 is a markup language used for displaying text and documents across different platforms and machines. It was originally intended for a very specific audience, and has expanded to include hypertext, multimedia, as well as the style of the documents displayed.
XML is an extensible markup language that was developed to retain the flexibility and power of HTML while reducing most of the complexity.
XHTML combines the flexibility of HTML with the extensibility of XML. But what does this mean?
In my tags for one browser article, I wrote about HTML tags that are only viewable in one browser or another. Some of these tags had been brought into the HTML 4.0 DTD, and others had not, but the result of using these tags is that your pages will never look the same in all browsers. The only solutions that an HTML writer has are: not use those tags, use those tags and state that the page is meant for one browser or another, or write multiple pages and use scripting techniques to direct readers to the appropriate pages.
With XHTML this is not necessary. With XHTML, if you find a need for a new markup tag, you simply define it in an XHTML module and use it in your page as you would any other HTML tag. You can also use XHTML to markup the code as appropriate for the (XHTML compatible) browser that is viewing it.