HTML Tutorial Class 4 headings

HTML Headings:-

HTML Headings are titles or subtitles that will show to your viewers at the top.

There are 6 types of heading tags. The HTML Headings tags are defined with the <h1>, <h2>, <h3>, <h4>, <h5>, <h6> tags.

<h1> Heading defines the most important heading and <h6> defines the least important heading.


<!DOCTYPE html>

<html>

<body>

<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>

Try this code for a better experience


NOTE: The browser automatically adds some white space (a margin) before and after the heading.

If you don't know about HTML Attributes then you have to learn about this before learning HTML Heading click on the link and learn.

Headings Are Important:-

Search engines detect your SEO when someone searches for your heading and will show them your web. That is why headings are so important for ranking your web page. 

<h1> Heading usually is the most important Heading consider that following the <h2> Heading and less important and so on.

NOTE:- Use HTML Heading for only headings don't use it for text bold or big.


Bigger Heading:-

Each HTML Heading has a default size you can change the size of the Heading by using style attributes, using the CSS font-size property.


<!DOCTYPE html>

<html>

<body>

<h1 style="font-size:50px;"> Heading 1 </h1>

<p> You can change the size of any heading using the style attribute, using the font-size property. You can increase the size of h6 to h1. </p>

</body>

</html>

Try this code for a better experience