The Freedom of XML—Defining It All Yourself

In HTML, and even now with XHTML 1.0, document authors are limited to the structures and presentation that have already been defined. But what if you want to do something else?

We can force existing elements to do what we want by using them in unconventional or even invalid ways, but doing so also compromises interoperability. Back in Chapter 1, you were introduced to one of my favorite examples of forcing meaning upon vague structure in an XHTML-based memorandum. The Web page author essentially has two choices when creating the document: use heading elements for each addressing component (see Listing 10.1), or simply use a paragraph and some line breaks with a liberal dose of emphasis (see Listing ...

Get XHTML by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.