HTML Headers


There are six heading types in HTML. Each of them vary in size as you can see below. In web development the first two headers will be the headers most commonly used. The main titles of each webpage here for example, use the <h1></h1> and <h2></h2> tags. Below is how you would write out each header tag in HTML code and how it would be outputted in the browser.



Header in HTML



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>

Output:


Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6