HTML5 hgroup Element

Jakob Jenkov
Last update: 2014-06-15

The HTML5 hgroup element is used to semantically group a headline and subheadline into the same header group.

Look at this example title:

<h1>Wealth</h1>
<h2>How the rich get richer, and how you can get richer too.</h2>

The h1 and h2 headline is actually part of the same title, but a browser or web crawler cannot see that. To signal that you enclose the two elements in a hgroup element, like this:

<hgroup>
<h1>Wealth</h1>
<h2>How the rich get richer, and how you can get richer too.</h2>
</hgroup>

Now the h1 and h2 elements are grouped into a single semantic headline. A web crawler will now understand that these two elements are part of the same headline.

Jakob Jenkov

Featured Videos

P2P Networks Introduction




















Advertisements

High-Performance
Java Persistence
Close TOC
All Tutorial Trails
All Trails
Table of contents (TOC) for this tutorial trail
Trail TOC
Table of contents (TOC) for this tutorial
Page TOC
Previous tutorial in this tutorial trail
Previous
Next tutorial in this tutorial trail
Next