HTML 5 <hgroup> Tag
<hgroup> tag is used for defining the heading of an HTML document or section. More specifically, it is used to group a set of
<h6> elements when the heading has multiple levels, such as subheadings, alternative titles, or taglines.
For example, you might have a level 1 heading, followed by a subheading in a level 2 heading. In this instance, the level 2 heading is different to the other level 2 headings in the document because it is an extension of the level 1 heading (i.e. it is a subheading of the heading). Therefore, to group the two together, you can use the
<hgroup> tag. The example below demonstrates this scenario.
<hgroup> tag was introduced (and subsequently dropped) in HTML 5.
Note that the
<hgroup> element has now been dropped from the W3C HTML5 specification. However, it is still included in the WHATWG Living Standard specification.
HTML tags can contain one or more attributes. Attributes are added to a tag to provide the browser with more information about how the tag should appear or behave. Attributes consist of a name and a value separated by an equals (=) sign, with the value surrounded by double quotes. Here's an example,
There are 3 kinds of attributes that you can add to your HTML tags: Element-specific, global, and event handler content attributes.
The attributes that you can add to this tag are listed below.
The following table shows the attributes that are specific to this tag/element.
The following attributes are standard across all HTML 5 tags.
For a full explanation of these attributes, see HTML 5 global attributes.
Event Handler Content Attributes
Event handler content attributes enable you to invoke a script from within your HTML. The script is invoked when a certain "event" occurs. Each event handler content attribute deals with a different event.
Here are the standard HTML 5 event handler content attributes.
For a full explanation of these attributes, see HTML 5 event handler content attributes.