1.2 An Example HTML Document

XHTML, and its predecessor language HTML, are just markup languages designed for use on the Web. They both use tags that are written using regular printable characters. Indeed, the two languages are nearly identical-- Chapter 2 looks at them, and their differences, in more detail.

Weird Icon -- just for show

To illustrate how these languages work, we will start with a simple example HTML (not XHTML) document, shown in Figure 1.1. This example illustrates the basic structure and rules for constructing documents in a way familiar to those who already know some HTML. We will also be able to use this example to illustrate such concepts as document parsability, and output rendering control. In Chapter 2 we will rework this example as an XHTML document to help highlight the differences between HTML and XHTML.

TIP: Differences between XHTML and HTML

The rules for writing correct XHTML and HTML documents are slightly different, and are outlined in more detail in Chapter 2. Appendix XX also provides a useful quick reference that explains the main differences between HTML and XHTML, and that describes the techniques to ensure that XHTML documents will be acceptable when treated as HTML.