Headings in HTML:

Headings are very important part of a web page . HTML uses the six level of heading tags from <h1> to <h6> that means <h1> is the most important heading and <h6> is the least important. You should always use heading tag to define heading not use it to make your text bold. <h1> tag should be used as a main heading of your web page and then the others. All heading tags also be get closed like this </h1>,</h2>…</h6>.

The default size of the headings is written below:

<h1> Heading 1 </h1> – 24pt(pt=point type, largest)

<h2> Heading 2 </h2> – 18pt

<h3> Heading 3 </h3> – 14pt

<h4> Heading 4 </h4> – 12pt

<h5> Heading 5 </h5> – 10pt

<h6> Heading 6 </h6> – 8pt (smallest)

 

Note:

 

HTML heading tag take margin from top and bottom means it will take one line before and after it is a built-in attribute associated with all HTML heading tag. Whenever you use heading tag the browser automatically insert a line before and after it.

Here is a simple example for heading tag so try it on your editor:

 

Leave a Reply

Your email address will not be published. Required fields are marked *