1. Introduction

XHTML (eXtensible HyperText Markup Language) is a family of current and future, XML based, document types and modules, that reproduce, subset, and extend HTML 4.

XHTML 1.0 is the first document type in the XHTML family and it is a reformulation of the three HTML 4 document types (strict, transitional and frameset) as applications of XML 1.0.

In matter of fact, XHTML springs from the need to reformulate the markup language that lies at the foundation of the World Wide Web. Along the years, HTML has dramatically evolved: first born as a simple language for exchanging technical and scientific documents, along with its growing popularity, it rapidly got fattened up with a multitude of new elements. The vast majority of these elements responded to the need for a more sophisticated visual representation of the document content (fonts, background, alignment, to say nothing about proprietary tags like <blink> or <marquee>), adding nothing to the actual information contained in the document.

As it could be expected, this "hypertrophic" HTML led to serious interoperability problems among platforms, which still cause sleepless nights for many web developers.

XHTML has the aim to reinstate the separation of logical and visual representation of the document content, fully delegating the visual layout to external tools, such as CSS (Cascading Style Sheets). This approach provides several benefits:

The purpose of this crib sheet is to provide web developers with a very simple, complete and easy-to-refer-to guide to the XHTML 1.0 syntax and help them migrating from HTML 4. XHTML syntax is much stricter than HTML: what so far was a little mistake or omission ignored by any browser, now becomes an out-and-out syntax error. Keeping at hand a complete scheme of which elements can nest in each other or of the legal attributes and values for each element can save you a lot of time.

We won't cover the transitional DTD which has maintained all the HTML elements deprecated by the W3C to make the migration from HTML 4 easier; keeping using those elements would take away much of the benefits of XHTML and would make the future migration to XHTML 1.1 much harder. We will cover frames instead, which, although banned by XHTML 1.1, are sometimes still hard to replace.