Description

The HTML element <hgroup> is used to group heading elements.

The below table summarizes its usage.

Usage Details
Placement It is displayed as a Block element.
It cannot be a descendant or inside the elements <header>, <footer>, <address>.
Contents It can contain one or more heading elements <h1> to <h6>.
Tags Both opening and closing tags are required.
Versions HTML5

Syntax

Here is the basic syntax of the <hgroup> element.

<hgroup>...</hgroup>

Examples

Element <hgroup> used to define web page header with navigation links.

<hgroup>
    <h1>This is a main heading.</h1>
    <h2>This is a sub-heading.</h2>
</hgroup>

Attributes

The following table shows the list of supported and unsupported attributes for the <hgroup> tag.

Attribute Type Details
Element-Specific Attributes The tag <hgroup> doesn't have any element-specific attributes.
Global Attributes Like all other HTML tags, the tag <hgroup> supports the HTML Global Attributes.
Event Attributes The tag <hgroup> also supports the HTML Event Attributes.

Browser Compatibility

The tag <hgroup> is supported in all modern browsers.

  • Google Chrome 5+
  • Internet Explorer or Edge 9+
  • Firefox 4+
  • Apple Safari 4.1+
  • Opera 11.1+

Related Links