HTML/Elements/hgroup

From Web Education Community Group
< HTML‎ | Elements
Revision as of 16:34, 22 November 2011 by Hiroki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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>

Hgroup01.png

HTML Reference

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