Tutorials     About     RSS
Tech and Media Labs

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





















Sponsored Ads

Maildroppa - Smart Email Marketing Solution
Close TOC

All Trails

Trail TOC

Page TOC

Previous

Next