hgroup element represents the
heading of a section. The element is used to group a set of
h6 elements when the heading has
multiple levels, such as subheadings, alternative titles, or
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
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. If there are no such elements, then the text of
hgroup element is the empty string.
Other elements of heading content in the
hgroup element indicate subheadings or subtitles.
The rank of an
hgroup element is the
rank of the highest-ranked
element descendant of the
hgroup element, if there are
any such elements, or otherwise the same as for an
element (the highest rank).
The section on headings and sections
hgroup elements are assigned to individual
Here are some examples of valid headings. In each case, the emphasized text represents the text that would be used as the heading in an application extracting heading data and ignoring subheadings.
<hgroup> <h1>The reality dysfunction</h1> <h2>Space is not the only void</h2> </hgroup>
<hgroup> <h1>Dr. Strangelove</h1> <h2>Or: How I Learned to Stop Worrying and Love the Bomb</h2> </hgroup>