Yammi
Yammi

Reputation: 735

HTML5 - Using <hgroup> and <a> problem

If I do this it fails validation

<header>
 <hgroup>
  <a href="#">
   <h1>Title</h1>
   <h2>Tagline</h2>
  </a>
 </hgroup>
</header>

But if I do this, then Firefox chokes on it

<header>
 <a href="#">
  <hgroup>
   <h1>Title</h1>
   <h2>Tagline</h2>
  </hgroup>
 </a>
</header>

What is the correct way to have the whole header as a link?

Upvotes: 2

Views: 204

Answers (1)

Kornel
Kornel

Reputation: 100200

The latter is correct and seems to work fine in Firefox 4 (Firebug shows correct DOM).

Upvotes: 1

Related Questions