I'm sure you've heard people mumbling about XHTML and how it combines HTML and XML to create the "next generation" of HTML. I too had heard the mumbling, but actually had no idea what XHTML was... up until about 2 months ago. In this article, Mitchell gives us a quick run down of what XHTML is, some of its benefits, how it can be used, and what it looks like. He wraps up the article with a couple of XHTML examples.
As you can probably guess by now, XHTML code looks very similar to plain old HTML code, with just a couple of syntactic differences. Three examples of valid XHTML documents are shown below. They were validated using the W3Cís XHTML validation tool, located at http://validator.w3.org/.
This example used the strict DTD, meaning that every single tag must be closed properly, all attributes assigned values, etc:
This example uses the transitional DTD, which provides support for older browsers that donít recognize style sheets. You can see it uses several attributes within the <body> tag, which arenít allowed when using the strict DTD: