Building Blocks of XHTML Documents

All XHTML elements fall into two categories: block-level elements and inline elements. Both types of elements look the same: They have opening tags, content, and closing tags. What's different is what is allowed to occur within that enclosed content.

Block-Level Elements

Think of block-level elements as the large concrete blocks used to build a house or other building. They provide the main structure of the document, where the inline elements provide the finishing details.

The definition of what can or can't be included within an element is known as the content model. The content model for each element is defined in the document type definition, or DTD. That is the document that is referenced by the URI in ...

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.