This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.
The HTML <hgroup>
element represents the heading of a section. It defines a single title that participates in the outline of the document as the heading of the implicit or explicit section that it belongs to.
Content categories | Flow content, heading content, palpable content. |
---|---|
Permitted content | One or more <h1> , <h2> , <h3> , <h4> , <h5> , and/or <h6> . |
Tag omission | None, both the starting and ending tag are mandatory. |
Permitted parents | Any element that accepts flow content. |
Permitted ARIA roles | tab, presentation |
DOM interface | HTMLElement |
This element only includes the global attributes.
The <hgroup>
element has been removed from the HTML5 (W3C) specification, but it still is in the WHATWG version of HTML. It is partially implemented in most browsers, though, so is unlikely to go away. As the outline algorithm is not implemented in any browsers, the <hgroup>
semantics are in practice only theoretical. The HTML5 (W3C) specification provides advice on how to mark up Subheadings, subtitles, alternative titles and taglines
The text for <hgroup>
element in the outline algorithm is the text of the first HTML Heading Element of highest rank (i.e., the first <h1>
, <h2>
, <h3>
, <h4>
, <h5>
or <h6>
with the smallest number among its descendants) and the rank is the rank of this very same HTML Heading Element.
Therefore this element groups several headings, contributing only the main one to the outline of the document. It allows associating secondary titles, like subheadings, alternative titles, or even taglines, with the main heading, without polluting the outline of the document.
<hgroup> <h1>Main title</h1> <h2>Secondary title</h2> </hgroup>
Specification | Status | Comment |
---|---|---|
WHATWG HTML Living Standard The definition of '<hgroup>' in that specification. | Living Standard |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 5 | (Yes) | 4.0 (2.0) | 9.0 | 11.10 | 4.1 |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | 2.2 | (Yes) | 4.0 (2.0) | 9.0 | 11.0 | 5.0 |
<body>
, <article>
, <section>
, <aside>
, <h1>
, <h2>
, <h3>
, <h4>
, <h5>
, <h6>
, <nav>
, <header>
, <footer>
, <address>
;
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup