hgroup element

If you don't know what an element is or how you must use it, I recommend you read the "HTML tags and attributes" tutorial that you can find in the HTML tutorials section.

Description

The hgroup element represents the heading block of a section, and usually groups consecutive headings (h1 to h6). A multiple level heading can be used to provide subheadings or subtitles, alternative titles or taglines.

The use of the hgroup element allows to correctly mark up consecutive headings, which also aids outline algorithms when processing the sections.

Examples

In the following example we have a title and a tagline, used as a supplementary expression with the purpose of transmitting an enticing effect. Both headings are properly contained by an hgroup element.

<hgroup>
  <h1>Alien</h1>
  <h2>In space, no one can hear you scream</h2>
</hgroup>
<p>The commercial vessel Nostromo receives a distress call from an unexplored planet. After searching for survivors, the crew heads home only to realize that a deadly bioform has joined them.</p>

Alien

In space, no one can hear you scream

The commercial vessel Nostromo receives a distress call from an unexplored planet. After searching for survivors, the crew heads home only to realize that a deadly bioform has joined them.

Now, we're using the hgroup element to mark up a title and a secondary alternative version of it.

<hgroup>
  <h1>A clash of kings</h1>
  <h2>A Song of Ice and Fire, volume 2</h2>
</hgroup>
<p>A Clash of Kings is the second novel in A Song of Ice and Fire, an epic fantasy series by American author George R. R. Martin expected to consist of seven volumes.</p>

A clash of kings

A Song of Ice and Fire, volume 2

A Clash of Kings is the second novel in A Song of Ice and Fire, an epic fantasy series by American author George R. R. Martin expected to consist of seven volumes.

Attributes

Global attributes

For information about global attributes refer to this list of global attributes in HTML5.

Events

Global events

For information about global events refer to this list of global events in HTML5.

X

Are you looking for a place to host your next website? I can help you with that!