HTML <hgroup> Tag


Example

Use the hgroup element to mark that the heading and the paragraph are related:

<hgroup>
  <h2>Norway</h2>
  <p>The land with the midnight sun.</p>
</hgroup>
Try it Yourself »

Definition and Usage

The <hgroup> tag is used to surround a heading and one or more <p> elements.

The heading inside the <hgroup> element can be any of the <h1> to <h6> headings.

Note: The <hgroup> element does not render as anything special in a browser. However, you can use CSS to style the <hgroup> element and its content.


Browser Support

Element
<hgroup> Yes Yes Yes Yes Yes

Global Attributes

The <hgroup> tag also supports the Global Attributes in HTML.


Event Attributes

The <hgroup> tag also supports the Event Attributes in HTML.



Related Pages

Heading tags: <h1> to <h6> Tags


Default CSS Settings

Most browsers will display the <hgroup> element with the following default values:

Example

hgroup {
  display: block;
}
Try it Yourself »

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.