H2 - Level-two Heading

Syntax <H2>...</H2>
Attribute Specifications
Contents
Contained in , , , , , , , , , , , , , , , , , ,

The H2 element defines a level-two heading. This heading is more important than an but less important than an .

The ALIGN attribute suggests the horizontal alignment for the heading on visual browsers. Possible values are left, right, center, and justify. provide greater flexibility in suggesting alignment.

Visual browsers typically render H2 in a large, bold font. Authors can suggest a presentation for H2 through style sheets. The following ruleset suggests a presentation for all H2 elements:

h2 {
  color: #00008b;
  background: transparent;
  font-weight: bold;
  margin-left: 2%;
  margin-right: 2%
}

Authors should not choose a heading level based on the font size commonly used by visual browsers. The heading level should be chosen based on the heading's importance and placement in the document. An H2 is typically used within a section headed by an H1.

More Information