Text

Heading group

Published on

Description anchor

The heading group (<hgroup>) pairs a heading with a subtitle or tagline. Only the heading element within the group contributes to the document outline.

Example anchor

Open in new tab (opens in new tab)
View HTML markup
  <hgroup>
  <h1>Heading 1</h1>
  <p aria-roledescription="subtitle">Sub-Heading</p>
  <p aria-roledescription="subtitle"><small>Published on <time datetime="2000-01-01">January 1, 2000</time></small></p>
</hgroup>

Accessibility anchor

  • The <hgroup> element groups a heading with supplementary content (subtitle, tagline).
  • Only the primary heading (h1-h6) within <hgroup> is exposed as a heading to assistive technology.
  • The subtitle <p> is associated with the heading but does not create a separate heading level.

References anchor

Variables anchor

Set the size of heading