Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Sometimes a heading has multiple consecutive levels, such as with headline subheadings, alternative titles, or tag lines. Grouping them in an hgroup element indicates they are related . Each hgroup may contain only two or more h1–h6 headings; no other elements are allowed.
Two related headings are grouped together. In this example, the h2 is a subheading of the article’s h1 headline. Because it’s marked up with the highest-ranking heading, only “Giraffe Escapes from Zoo” appears in the document outline, but both display in the browser, as expected
. Similarly, if a second h1 appeared after it in the hgroup, it would be omitted from the outline just like the h2. Also, since the h2 doesn’t appear in the outline, the next heading in the article could be h2 (rather than h3) and be understood to be a direct subheading of the h1, “Giraffe Escapes from Zoo.”