Skip to content
Tutorials Center
My learning

Topics

HTML Reference Β· Sections

The <hgroup> element

Reference for the HTML <hgroup> element: grouping a heading with a subtitle or tagline, its content model, accessibility notes, examples and technical details.

The <hgroup> element groups a heading with one or more paragraphs that belong to it, such as a subtitle, an alternative title or a tagline. The heading keeps its place in the document outline; the paragraphs are treated as secondary text, not as extra headings.

HTML
<hgroup>
  <h1>Salt and Smoke</h1>
  <p>A cookbook of open-fire recipes</p>
</hgroup>

Try it

A heading with a subtitle

The paragraphs may come before the heading (like the "Chapter 3" kicker), after it, or both.

Attributes

This element has no attributes of its own. It accepts the global attributes.

Usage notes

  • Exactly one heading. An <hgroup> contains one <h1>–<h6> element and any number of <p> elements around it. Script-supporting elements (<script>, <template>) may also appear.
  • The old pattern is gone. Earlier drafts let <hgroup> contain several headings (an <h1> plus an <h2> subtitle). That is no longer valid: a subtitle is a paragraph, because it does not start a new section.
  • Don't fake subtitles with headings. Without <hgroup>, write a subtitle as a <p> right after the heading. Never use a lower heading level just to get smaller text.
  • Accessibility. The element maps to the group role. Screen readers announce the heading as usual; the subtitle is read as normal text, and is not included in heading lists.
  • When to skip it. If a heading has no subtitle or tagline, don't wrap it in <hgroup>.

Technical summary

Content categories Flow content, heading content, palpable content
Permitted content Zero or more <p> elements, followed by one <h1>–<h6> element, followed by zero or more <p> elements, optionally mixed with script-supporting elements
Tag omission None; both the start and end tags are required
Permitted parents Any element that accepts flow content
Implicit ARIA role group
DOM interface HTMLElement
Default display block

Browser support

Supported in every browser. The current content model (one heading plus paragraphs) changes only what is valid, not how browsers render it.