Html5 Hgroup Tag

The <hgroup> tag was introduced in HTML 5.The <hgroup> tag indicate the heading of a document or part of web page.which is used to group headers like this h1 to h6 tags.h1 is a largest is the main heading of the section others h2 to h6 is are sub-headings of the section. The <hgroup> tag did not exist in older versions of HTML.

Syntax:

<hgroup>
  <h1> ... </h1>
  <h2> ... </h2>
</hgroup>

Example Code

<!DOCTYPE HTML>
<hgroup>
  <h1>Heading 1 </h1>
  <h2>Heading 2 </h2>
  <h3>Heading 3 </h3>
</hgroup>

Out Put :



Heading 1

Heading 2

Heading 3

In the above first output Heading 1 is a largest heading. Heading 2 and Heading 3 is a sub heading.





Content