Loading Please Wait...

Logo Lynxsia IT Solutions

HTML Headings

HTML Headings

HTML headings are used to add some important text like page title, subtitle, headlines, etc.

Headings work as a block of text which always start from the new line. When the browser detects a heading, it adds some white space (margin) before and after the heading.

Heading Tags

There are six types of headings in HTML starting from <h1> to <h6> tags.

<h1> defines the most important headings where <h6> defines the least important headings

Let's see with some example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <h1>HTML Headings 1</h1>
              <h2>HTML Headings 2</h2>
              <h3>HTML Headings 3</h3>
              <h4>HTML Headings 4</h4>
              <h5>HTML Headings 5</h5>
              <h6>HTML Headings 6</h6>
            </body>
          </html>
        
      
Why Headings Are Important

When we visit any web page in a website we visualize the page as per the headings. So use headings to optimize the web page performance.

Search engines use headings to index pages as per the heading. SO headings play an important role in SEO.

Define main headings with <h1> tag followed by other heading tags in the hierarchy.

Do not use headings to make text large and bold. Use style (CSS) instead to format the headings.
Headings Formatting

We can use style attribute to format the headings. We can change color, font size, and more with style attribute.

Let's see with some example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <h1>Normal Heading</h1>
              <h1 style="color: red; font-family: cursive; font-size: 48px;">Formatted Heading</h1>
            </body>
          </html>
        
      
Learn more about style in our HTML Style Tutorials

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved