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:
The example below shows the <hgroup>
tag in action.
Example
Try this code »<hgroup>
<h1>This is a main heading</h1>
<h2>This is sub-heading</h2>
</hgroup>
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.
Basic Support—
|
Further Reading
See tutorial on: HTML Layout.