The <hgroup> element represents a heading and related content. It groups a single <h1>–<h6> with one or more <p> elements for a subtitle, alternative title, or tagline.
<hgroup> itself does not change the document outline. Only the heading inside it contributes to the outline.
Baseline · Widely available.
Stable across browsers since about July 2015. Use it when a heading and its tagline belong together.
Content model.
Zero or more <p>s, then one heading, then zero or more <p>s. Do not nest multiple headings.
Syntax
HTML Syntax
syntax.html
<hgroup><h1>…</h1> <p>…</p></hgroup>
Both start and end tags are required. Style the group with CSS; the tag only groups the meaning.
Reference
Attributes
<hgroup> has no element-specific attributes. Use global attributes:
Attribute
Description
Try it
(none specific)
No tag-only attributes — meaning comes from grouping heading + <p>
Switch common <hgroup> patterns for titles and taglines.
A real <hgroup>. Pick a pattern, then Apply (or tap a chip).
Preview
Frankenstein
Or: The Modern Prometheus
Title + subtitle · one h1, one p
Code
HTML Examples
Short, copy-ready snippets. Use Try It Yourself for a live editor.
Example 1 — Title with Subtitle
Group a main title and an alternate or subtitle line.
HTML
<hgroup>
<h1>Frankenstein</h1>
<p>Or: The Modern Prometheus</p>
</hgroup>
<p>
Victor Frankenstein has a great ambition: to create intelligent life…
</p>
Tighten heading margins so the tagline sits close.
Style the <p> as secondary text (weight, opacity, size).
Keep semantics intact — do not fake the title with a <div>.
Watch out
Edge Cases & Pitfalls
outline
Expecting a new outline node
<hgroup> does not add an outline entry. Only the heading inside it counts.
content
Multiple headings inside
Only one h1–h6 is allowed. Extra headings belong outside the group.
fake
Styled <p> as a heading
The real heading must be an h* element. Do not replace it with a large paragraph.
header
hgroup vs header
<header> is broader introductory content. <hgroup> is only heading + related <p>s.
seo
Keyword stuffing in taglines
Keep the subtitle short and related. The outline still hinges on the real heading text.
empty
Group with no heading
Without an h1–h6, the group loses its purpose. Always include the heading.
Compatibility
Browser Support
The <hgroup> element is core HTML in every modern browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
<hgroup>
Widely available since about July 2015. Chrome, Firefox, Safari, Edge, and Opera all support it.
98%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet Explorer9+
Supported
<hgroup>Widely supported
Bottom line: Safe to use for title + tagline groups. Remember: only the inner heading affects the outline.
Remember
Key Takeaways
Role: groups one heading with related <p> content.
Outline: only the heading inside contributes.
Model:p* + one h1–h6 + p*.
Practice: style the group; keep semantics honest.
One line: use <hgroup> for a heading plus its tagline <p>s — not for multiple headings.
UA style
Default CSS Settings
User-agent stylesheets typically treat <hgroup> as a block:
default.css
hgroup {
display: block;
}
Spacing between title and tagline comes from your CSS on the heading and paragraphs.
Frequently Asked Questions
hgroup groups a single h1–h6 heading with one or more related p elements — for example a subtitle, alternative title, or tagline — so they are treated as one heading unit visually and semantically.
No. hgroup supports only the global HTML attributes such as id, class, and lang.
No. hgroup itself does not add an outline entry. Only the single allowed heading inside it contributes to the document outline.
Zero or more p elements, then exactly one h1–h6, then zero or more p elements. The paragraphs hold the related secondary content.
No. Only one heading is allowed. Put secondary lines in p elements, not extra h2–h6 tags.
Its implicit role is group. You may use other roles when appropriate, but the default grouping is usually enough.