0

Is this valid markup for an hgroup tag?

<hgroup>
<h2>Main header</h2>
<img src etc>
<h3>Sub header</h3>
</hgroup>

For design purposes I want to put an image between the h elements. Putting the h tags within an hgroup would be in keeping with the spirit of the tag, as these headers are grouped together, and related. But of course, there nowhere does it state that putting an image in an hgroup is valid.

I'm assuming it isn't valid. Any thoughts?

1 Answers1

3

No, hgroup is being dropped from HTML 5, so any use of it is invalid. It might reappear in HTML 5.1 if browsers can produce some interoperable implementations.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • @JemmaCartwright Please mark Quentin's answer as the correct one if you found it answers your question. – hitautodestruct Apr 03 '13 at 14:55
  • 1
    This depends on the definition of “valid”. The `hgroup` element is still part of W3C HTML5 CR (and the working group may change its decisions), and the current validators accept it. Validity has become a vague concept when it is no more based on SGML/XML and DTDs. – Jukka K. Korpela Apr 03 '13 at 17:52
  • And to answer the actual question: No, [`hgroup`](http://www.w3.org/TR/html5/sections.html#the-hgroup-element) can/could only contain `h1`-`h6`. – unor Apr 04 '13 at 16:23