The <hgroup> element represent the heading of a section.
- The element is used to group a set of h1–h6 elements when the heading has multiple levels, such as subheadings, alternative titles, or taglines. [Example A]
- For the purposes of document summaries, outlines, and the like, the text of hgroup elements is defined to be the text of the highest ranked h1–h6 element descendant of the hgroup element, if there are any such elements, and the first such element if there are multiple elements with that rank.
- The rank of an hgroup element is the rank of the highest-ranked h1–h6 element descendant of the hgroup element, if there are any such elements, or otherwise the same as for an h1 element (the highest rank).
See global attributes.
The point of using hgroup in these examples is to mask the h2 element (which acts as a secondary title) from the outline algorithm. [try it]:
<hgroup> <h1>The reality dysfunction</h1> <h2>Space is not the only void</h2> </hgroup>
The HTML5 specification defines the <hgroup> element in 4.4.7 The hgroup element.