HTML Tags
Advertisements

HTML5 <hgroup> Tag

Topic: HTML5 Tags ReferencePrev|Next

Description

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

The following table summarizes the usages context and the version history of this tag.

Placement: Block
Content: One or more <h1> to <h6>
Start/End Tag: Start tag: required, End tag: required
Version: New in HTML5

Syntax

The basic syntax of the <hgroup> tag is given with:

HTML / XHTML: <hgroup> ... </hgroup>

The example below shows the <hgroup> tag in action.

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

Note: The <hgroup> element can be placed anywhere inside the <body> but it must not be a descendant of an <address>, <footer> or another <header> element.


Tag-Specific Attributes

The <hgroup> tag doesn't have any specific attribute.


Global Attributes

Like all other HTML tags, the <hgroup> tag supports the global attributes in HTML5.


Event Attributes

The <hgroup> tag also supports the event attributes in HTML5.


Browser Compatibility

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

Browsers Icon

Basic Support—

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

Further Reading

See tutorial on: HTML Layout.

Related tags: <body>, <nav>, <section>, <footer>.

Advertisements
Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties