This reference is built into PageRIJ — a live HTML, CSS & SVG authoring and learning environment.

HTML <hgroup> element

The <hgroup> element groups a heading with related title material, such as a subtitle, alternative title, or tagline.

The group contains exactly one heading element, such as <h1> or <h2>. Optional <p> elements may appear before or after it to supply the related wording. A heading alone is permitted, although the grouping is most useful when there is accompanying title material.

The heading supplies the heading level, and the accompanying paragraphs supply text that belongs with that heading. A subtitle is therefore written as a paragraph. Placing a second heading inside <hgroup> does not turn it into a subtitle and does not satisfy the element's content rules.

In the example below, “PageRIJ” is the heading and “A live HTML and CSS learning workspace” is its tagline. Both belong to the same title group. The element does not supply a special visual treatment for the tagline; CSS can control its size, spacing, and other presentation.

Ordinary introductory paragraphs belong outside this title group. A <header> can group a broader introduction, including an <hgroup>, introductory text, and navigation. The two elements serve different purposes and can be used together.

Attributes: GLOBALS.

Typical layout:
<hgroup>
  <h1>PageRIJ</h1>
  <p>A live HTML and CSS learning workspace</p>
</hgroup>
Visual representation:

PageRIJ

A live HTML and CSS learning workspace