HTML Headings 📌


Heading is a title that you want to display on your web page


Basic knowledge

HTML headings are defined by the <h1> to <h6> tags.
The <h1> tag is used for the largest heading, Also this is a most important heading
the <h6> tag is used for the smallest heading, Also this is a less important heading


Note:- important for search engine optimizer(SEO)

Example


<h1>This is a heading 1</h1>
<h2>This is a heading 2</h2>
<h3>This is a heading 3</h3>
<h4>This is a heading 4</h4>
<h5>This is a heading 5</h5>
<h6>This is a heading 6</h6>

Code preview ↓

Code preview image

Let's talk about importance of heading.

Okay as we all know, the heading is the title of the page.
Now maybe you have a question why so many headings are there on the web page?
Well, when a search engine indexes a web page/website, it will index that web page according to that heading. That means that will structure and content base on the heading. So I think you understand why the heading play a big role in a website.

Note:- Each HTML heading has a default size, But you can change the size using font-size property.