Text

Heading group

Published on

Description Link to section description

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 Link to section example

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 Link to section accessibility

  • 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 Link to section references

Variables Link to section variables

Set the size of heading