O'Reilly logo

Dynamic HTML: The Definitive Reference by Danny Goodman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

<H1>, <H2>, <H3><H4>, <H5>, <H6> — NN all IE all HTML all

Synopsis

<H1>...</H1>, <H2>...</H2>,
<H3>...</H3>
H4>...</H4>, <H5>...</H5>,
<H6>...</H6>

End Tag: Required

HTML defines a series of six heading levels whose associated numbers are intended to signify the relative importance of the section below the heading. The H1 element represents the most important, whereas H6 represents the least important. HTML document parsers could examine a page’s tags to create a table of contents based on the headings. This means that for proper document structure, these heading levels should be used in proper sequence, without skipping levels for aesthetic purposes.

It is up to the browsers to determine the font, weight, and other characteristics of each level. Each heading element is rendered on its own line, with no line break or paragraph elements necessary to begin the content of the section titled with the heading. Figure 8.3 shows examples of how Navigator 4 and Internet Explorer 4 renders all six heading levels in Windows 95. By and large, this pattern applies to other browser versions and operating systems except for Navigator on the Macintosh, whose default H4 and H6 elements render characters wider (albeit shorter) than the H3 and H5 elements preceding them.

Heading levels in Internet Explorer 4 and Navigator 4

Figure 8-3. Heading levels in Internet Explorer 4 and Navigator 4

You can always override the browser’s rendering style for any ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required