XHTML Tutorial: Standards-Based Web Design

by Paul Bohman

Headings

In XHTML, there are 6 predefined levels of headings:

There are no pre-defined headings after <h6>. The purpose of headings is to organize written content into a logical outline. In most cases, the main content of a web page should begin with a <h1> heading. Subheadings beneath that would be <h2>, and so on. It is best to keep the heading structure internally consistent, so that the next heading below <h1> is not <h6>, for example.

Browsers display <h1> headings very large, and <h6> headings very small, with descending sizes in between, as shown below:

This is a heading level 1.

This is a heading level 2.

This is a heading level 3.

This is a heading level 4.

This is a heading level 5.
This is a heading level 6.

You can alter the default size of headings using Cascading Style Sheets (CSS). Knowing this, you should not refuse to use a certain heading just because it is too big or too small. Using headings in a logical way is always the right thing to do. Once the heading structure is in place, you can alter the way it looks with CSS.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.