Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 493569 of <hgroup>

  • Revision slug: Web/HTML/Element/hgroup
  • Revision title: <hgroup>
  • Revision id: 493569
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Updated tags

Revision Content

{{seeCompatTable}}
 

Usage note: This element has been removed from the HTML5 (W3C) specification, but it still is in the WHATWG version of HTML. Its future is uncertain, so refrain from using it.

Summary

The HTML <hgroup> Element (HTML Headings Group 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.

Its text for the outline algorithm is the text of the first HTML Heading Element of highest rank (i.e., the first {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}} or {{HTMLElement("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.

  • Content categories Flow content, heading content, palpable content.
  • Permitted content One or more {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, and/or {{HTMLElement("h6")}}.
  • Tag omission {{no_tag_omission}}
  • Permitted parent elements Any element that accepts flow content.
  • DOM interface {{domxref("HTMLElement")}}

Attributes

This element only includes the global attributes.

Examples

<hgroup>
  <h1>Main title</h1>
  <h2>Secondary title</h2>
</hgroup> 

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 5 {{CompatGeckoDesktop("2.0")}} 9.0 11.10 4.1
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 2.2 {{CompatGeckoMobile("2.0")}} 9.0 11.0 5.0 (iOS 4.2)

See also

  • Others section-related elements: {{HTMLElement("body")}}, {{HTMLElement("article")}}, {{HTMLElement("section")}}, {{HTMLElement("aside")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("nav")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}, {{HTMLElement("address")}};
  • Sections and outlines of an HTML5 document.

{{HTMLRef}}

Revision Source

<div>
 {{seeCompatTable}}</div>
<div>
 &nbsp;</div>
<div class="note">
 <p><strong>Usage note: </strong>This element has been removed from the HTML5 (W3C) specification, but it still is in the WHATWG version of HTML. Its future is uncertain, so refrain from using it.</p>
</div>
<h2 id="Summary">Summary</h2>
<p>The <strong>HTML <code>&lt;hgroup&gt;</code> Element</strong> (<em>HTML Headings Group Element</em>) represents the heading of a section. It defines a single title that participates in <a href="/en-US/docs/Sections_and_Outlines_of_an_HTML5_document" title="Sections and Outlines of an HTML5 document">the outline of the document</a> as the heading of the implicit or explicit section that it belongs to.</p>
<p>Its <em>text</em> for the outline algorithm is the text of the first HTML Heading Element of highest rank (i.e., the first {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}} or {{HTMLElement("h6")}} with the smallest number among its descendants) and the <em>rank</em> is the rank of this very same HTML Heading Element.</p>
<p>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.</p>
<ul class="htmlelt">
 <li><dfn><a href="/en-US/docs/HTML/Content_categories" title="HTML/Content_categories">Content categories</a></dfn> <a href="/en-US/docs/HTML/Content_categories#Flow_content" title="HTML/Content categories#Flow content">Flow content</a>, heading content, palpable content.</li>
 <li><dfn>Permitted content</dfn> One or more {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, and/or {{HTMLElement("h6")}}.</li>
 <li><dfn>Tag omission</dfn> {{no_tag_omission}}</li>
 <li><dfn>Permitted parent elements</dfn> Any element that accepts <a href="/en-US/docs/HTML/Content_categories#Flow_content" title="HTML/Content categories#Flow content">flow content</a>.</li>
 <li><dfn>DOM interface</dfn> {{domxref("HTMLElement")}}</li>
</ul>
<h2 id="Attributes">Attributes</h2>
<p><span style="line-height: 21px;">This element only includes the&nbsp;</span><a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">global attributes</a><span style="line-height: 21px;">.</span></p>
<h2 id="Examples">Examples</h2>
<pre class="brush: html">
&lt;hgroup&gt;
  &lt;h1&gt;Main title&lt;/h1&gt;
  &lt;h2&gt;Secondary title&lt;/h2&gt;
&lt;/hgroup&gt; 
</pre>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Chrome</th>
    <th>Firefox (Gecko)</th>
    <th>Internet Explorer</th>
    <th>Opera</th>
    <th>Safari</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>5</td>
    <td>{{CompatGeckoDesktop("2.0")}}</td>
    <td>9.0</td>
    <td>11.10</td>
    <td>4.1</td>
   </tr>
  </tbody>
 </table>
</div>
<div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>IE Mobile</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>2.2</td>
    <td>{{CompatGeckoMobile("2.0")}}</td>
    <td>9.0</td>
    <td>11.0</td>
    <td>5.0 (iOS 4.2)</td>
   </tr>
  </tbody>
 </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
 <li>Others section-related elements: {{HTMLElement("body")}}, {{HTMLElement("article")}}, {{HTMLElement("section")}}, {{HTMLElement("aside")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("nav")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}, {{HTMLElement("address")}};</li>
 <li><a class="deki-ns current" href="/en-US/docs/Sections_and_Outlines_of_an_HTML5_document" title="Sections and Outlines of an HTML5 document">Sections and outlines of an HTML5 document</a>.</li>
</ul>
<p>{{HTMLRef}}</p>
Revert to this revision