Headings In HTML: Learn More About HTML Headings

  • Post category:HTML
  • Post author:
  • Post last modified:June 14, 2021
  • Reading time:3 mins read
You are currently viewing Headings In HTML: Learn More About HTML Headings

HTML headings are large bold text that defines a heading, title, or subtitle in a document. Headings are very important it makes a page clean and beautiful and helps you in SEO.

In HTML there are six heading tags <h1> to <h6>. Where Heading 1 represents a big heading and h6 represents a small heading.

<h1> Heading 1 </h1>
<h2> Heading 2 </h2>
<h3> Heading 3 </h3>
<h4> Heading 4 </h4>
<h5> Heading 5 </h5>
<h6> Heading 6 </h6>

Results

headings-in-html

Default CSS by a Browser

When you view or write an HTML Heading tag it has some default CSS which is automatically added by your browser. You can change this default CSS by writing your own CSS code. If you don’t know about CSS, please don’t worry you will learn everything in the CSS chapter, just learn with us what we write.

Headings LabelDefault CSS
h1font-size – 32px
font-weight – bold
display – block
color – black
h2font-size – 24px
font-weight – bold
display – block
color – black
h3font-size – 18.72px
font-weight – bold
display – block
color – black
h4font-size – 16px
font-weight – bold
display – block
color – black
h5font-size – 13.28px
font-weight – bold
display – block
color – black
h6font-size – 10.72px
font-weight – bold
display – block
color – black

Heading with different style

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

Ashim Khatua

Professionally Web Developer since 2015, And also a Blogger. I am the founder of SiteCodings.com. I love to share my knowledge, which I earned the past few years. I want to share my knowledge with you through my Blog. Keep Reading.

Leave a Reply