Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
If XML is a language that can be used to invent new markup languages, and HTML is a markup language, can we use XML to recreate HTML? We sure can. Let’s see how this might look before we talk about why in the heck you’d actually want to:
This is going to sound very anticlimatic, but XHTML is XML while HTML is, well, just HTML. The big distinction may be difficult for you to see at first glance, but the reason XML is a good thing (and the reason the W3C and others have gone to all the trouble of creating XHTML, when they already had HTML) is that once your pages are written in XHTML, all sorts of things become possible that aren’t possible with HTML. (You’ll get a feel for some of those things in just a sec).