Warning:
This wiki has been archived and is now read-only.

Elements/hgroup

From HTML Wiki
Jump to: navigation, search

<hgroup>

The <hgroup> element represent the heading of a section.

Point

  • 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).


HTML Attributes

See global attributes.


Examples

Example A

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>


HTML Reference

The HTML5 specification defines the <hgroup> element in 4.4.7 The hgroup element.