CKTIS / HTML
hgroup — a heading with related content
The hgroup element combines one h1–h6 heading with related content, such as a subtitle or tagline marked up as p. It is not a container for multiple headings.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<hgroup>
<h1>Heading</h1>
<p>Subtitle or tagline</p>
</hgroup>hgroup represents a heading together with related content. Use it when a title has a subtitle, alternative title, or tagline. Put that supporting content in p, not in another h1–h6 heading.
Its content model requires exactly one element from h1–h6. Zero or more p elements may precede and follow it; script-supporting elements may also be interspersed. Both hgroup tags are required. The element supports global attributes and uses the HTMLElement interface.
Unlike header, which groups introductory content or navigational aids, hgroup associates a heading with its supporting content. In the example, h1 is the title and p is its subtitle, not the heading of a separate subsection.
Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>hgroup example</title>
</head>
<body>
<hgroup>
<h1>Urban gardens</h1>
<p>A practical guide for small spaces</p>
</hgroup>
</body>
</html>Result
Urban gardens A practical guide for small spaces
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.