HTML <h2> Tag


The <h1> to <h6> tags are used to define HTML headings.

<h1> defines the largest heading and <h6> defines the smallest heading. As the number in the headline decreases, the character becomes thinner and smaller, but its proportion varies depending on the browser. In order to specify this size and appearance it is necessary to use css properties.

Example Code:
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>


Global Attributes:

The <h2> tag also supports the Global Attributes in HTML5

Event Attributes:

The <h2> tag also supports the Event Attributes in HTML5