Course Content
HTML Introduction
0/1
HTML Editors
0/1
HTML Basic Tags
0/1
HTML Elements
0/1
HTML Attributes
0/1
HTML Headings
0/1
HTML Paragraph
0/1
HTML Text Formatting
0/1
HTML Meta Tags
0/1
HTML Quotations
0/1
HTML Comments
0/1
HTML Images
0/1
HTML Background
0/1
HTML Colors
0/1
HTML Lists
0/1
HTML Tables
0/1
HTML Forms
0/1
HTML Spell Check
0/1
HTML Media
0/1
HTML Marquees
0/1
HTML CSS
0/1
HTML Links
0/1
HTML Block & Inline
0/1
HTML Classes
0/1
HTML Id
0/1
HTML I frames
0/1
HTML Java script
0/1
HTML File paths
0/1
HTML Layout
0/1
HTML Responsive
0/1
HTML Computer Code
0/1
HTML Tutorial
About Lesson

HTML Headings

In this tutorial, we will learn about headings in HTML and its types with the help of examples.


Headings

  • HTML headings are important to use in any document.
  • These headings show the document structure and the users are attracted by the headings.
  • These headings help the search engines to index the structure and content of the webpage.
  • Heading tags help us to give headings to the content of a webpage.

Types of Headings

There are six different HTML headings which are defined with the <h1> tag to <h6> tag.

  • <h1> is the most important heading.
  • <h6> is the least important heading.

Browsers automatically add some space before and after a heading.
Every tag displays the heading in a different style and font size. <h1> heading should be used for the main heading of the document, followed by <h2> headings, then the less important heading <h3>, and so on.

Example :

<!DOCTYPE html>
<html>
  <head>
    <title>Document</title>
  </head>
  <body>
    <h1 title = "Heading 1">Hello World!</h1>
    <h2 title = "Heading 2">Hello World!</h2>
    <h3 title = "Heading 3">Hello World!</h3>
    <h4 title = "Heading 4">Hello World!</h4>
    <h5 title = "Heading 5">Hello World!</h5>
    <h6 title = "Heading 6">Hello World!</h6>
  </body>
</html>

Output

Hello World!

Hello World!

Hello World!

Hello World!

Hello World!
Hello World!
error: Content is protected !!