Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

XHTML

What is XHTML? Well, that's a good question. It is the next great white hope for clean web pages. It should separate content from formatting. I know HTML was supposed to do that but it failed.

Things started well. HTML began as a simple way to transfer data between any computer across the Internet. The presentation of the information wasn’t important. Content was what counted. That didn’t last long. The web some became mainstream and browser companies brought in new tags that didn't go along with this original aim — presentation became hugely important and structure and compatibility took a back seat. This meant that some pages were not accessible for people with the wrong browser or computer.

So, today, most HTML web pages are a mix of standard HTML and browser-specific markup. This has improved a bit in recent times, mainly due to CSS. HTML once more is structural, with presentation controlled by a CSS stylesheet. XHTML should improve things still further. It is a very strict way of coding that means the system makers don't have to handle bad markup.

So here we go:

  • XHTML is Extensible HyperText Mark-up Language. This means that you can add new tags of your own. That's what the extensible part is
  • It replaces HTML and is similar to it except that the syntax rules are much stricter. Many of the tags and attributes remain the same (until the next version)

Are you any the wiser? Here's a potted history.

In the beginning was HTML and it was good, but not great. It was defined using SGML, the Standard Generalized Markup Language. SGML has been around forever but, although it is powerful, it is difficult to use and learn.

Now, lots of people want to extend HTML to handle things like chemical formulae or musical notation. As SGML is difficult to use, the W3C created a subset of SGML known as XML, the Extensible Markup Language. XML allows you create your own tags and attributes to suit the type of document you're writing. You place these rules in a Document Type Definition (DTD).

Once they had done this, the W3C then rewrote the HTML 4.01 standard using XML. The resulting markup language is known as XHTML 1.0, the Extensible Hypertext Markup Language, which is really very similar to the HTML we know and love. It has most of the same tags.

Browsers don't support XHTML at the moment, but they will. Sooner or later. Now's the time to get ready.