Hearders are like the chapter headings of a book. Header tag is written as <Hn> and </Hn> where n is a number from 1 to 6 . For example, <H1>
Now let's create an HTML file named headers.html to understand the necessity of heading element in HTML.
Program in Notepad :
The title " Headers " is displayed in a bold and larger font than the remaining text.
There are six levels of heading elements that range H1 to H6. The largest font size of heading is represented by H1 and smallest font size of heading is represented by H6.
Let's create an HTML file to understand different levels of heading elements.
Webpage in internet explorer :
Now let's create an HTML file named headers.html to understand the necessity of heading element in HTML.
Program in Notepad :
The title " Headers " is displayed in a bold and larger font than the remaining text.
There are six levels of heading elements that range H1 to H6. The largest font size of heading is represented by H1 and smallest font size of heading is represented by H6.
Let's create an HTML file to understand different levels of heading elements.
Webpage in internet explorer :