What is the <hgroup> element in HTML?

The <hgroup> element in HTML is used to display a multi-level heading on a webpage. The <hgroup> element ensures that the primary heading is grouped with the secondary headings, such that the secondary headings do not form their own separate section. For example, <hgroup> can be used to display a multi-level heading that includes the title of an article, the author’s name, and the byline of the article. The children elements of <hgroup> can be any of the <h1>-<h6> headings.

NOTE: The <hgroup> element is no longer part of the HTML5 standard. It’s advised to follow the HTML5 specification to mark up your multi-level headings without using <hgroup>.

Example

Explanation

In lines 6-10, you can observe the <hgroup> element and its children <h1>-<h3> elements that form a multi-level heading of the simple webpage.

Free Resources

Copyright ©2026 Educative, Inc. All rights reserved