# 36. XHTML Legacy Headings Module

Contents

This section is normative.

This module defines the traditional HTML heading elements `h1` - `h6`.

Element | Attributes | Content Model
--- | --- | ---
h1 | Common | ( Text)*
h2 | Common | ( Text)*
h3 | Common | ( Text)*
h4 | Common | ( Text)*
h5 | Common | ( Text)*
h6 | Common | ( Text)*

Implementations: RELAX NG, XML Schema

## 36.1. The heading elements

A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.

Attributes

The Common collection
  A collection of other attribute collections, including: Bi-directional, Core, Edit, Embedding, Events, Forms, Hypertext, I18N, Map, Metainformation, and Role

There are six levels of numbered headings in XHTML with h1 as the most important and h6 as the least.

Example

    <body>
    <h1>This is a top level heading</h1>
        <p>....</p>
        <h2>This is a second-level heading</h2>
        <p>....</p>
        <h2>This is another second-level heading</h2>
        <p>....</p>
    <h1>This is another top level heading</h1>
        <p>....</p>
        <h2>This is another second-level heading</h2>
        <p>....</p>
            <h3>This is a third-level heading</h3>
            <p>....</p>
    </body>

Numbered sections and references
XHTML does not itself cause section numbers to be generated from headings. Style sheet languages such as CSS however allow authors to control the generation of section numbers.

Skipping heading levels is considered to be bad practice. The series `h1 h2 h1` is acceptable, while `h1 h3 h1` is not, since the heading level `h2` has been skipped.