tags:

views:

66

answers:

3

Hi Friends

Why was the <hgroup> tag added to HTML5? What’s their technical usage? What’s the grouping advantage?

+2  A: 

Here is good article about that on HTML5 Doctor:

The hgroup element

Sarfraz
A: 

Dive into HTML5 also has a pretty good <hgroup> example.

Paul D. Waite
A: 

The problem with headers and their 'levels' arises when you generate dynamic content. Let's say you have a more or less fixed H1 and H2 combo and the page, and you have an article section with dynamic content that comes from a rich editor.

Traditionally it would be problematic at best to try and guess which header leveles to allow in the editor markup.

I haven't studied the hgroup element in detail, but I have read the article above and others, and it seems logical to me that the hgroup element can be used to 'reset' the level numbering, so that dynamic content in a rich editor can start using H1.

thomask
I don’t think it’s the `<hgroup>` element that allows you to use `<h1>` anywhere — that’s more the `<section>` element and the outlining algorithm. `<hgroup>` lets you combine e.g. an `<h2>` and an `<h3>` into one heading, so they’re considered as a single heading in the outline.
Paul D. Waite
You are absolutely correct!
thomask