HTML headings
are titles
and sub-titles
that you use in your web pages.
There are 6 styles of HTML headings tags starting from <h1>
to <h6>
.
<h1>
defines the most important heading. <h1> heading is used for the main titles of the pages.
<h2>
heading mostly used for sub-titles.
<h6>
defines the least important heading.
Syntax:
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
Code:
<!DOCTYPE html>
<html>
<head>
<title>HTML Headings</title>
</head>
<body>
<p> List of Heading tag starting from < h1 > to < h6 >
</p>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>
</html>
Output:
You may be interested in the following topics: