How Can We Help?
< All Topics

Headings

HTML specifies six levels of headings. All heading element has their own font size and spacing before and after the heading.

Headings are defined with the <h1> to <h6> tags.

<h1> defines the most important (highest level) heading. <h6>defines the least important heading.

Example of All HTML Headings Levels:

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

Why HTML Headings Are Important?

HTML Heading tags are important for users as well as Search Engines.

  • Heading tags helps users to pay attention to the main headings.
  • Search engines (such as Google) also use your headings to understand the important components of your website.
  • We should use HTML headings to define headings content only. It should not be used just to make text big or bold.

Complete HTML Example with Headings

<!DOCTYPE html>
<html>

<head>
    <title>HTML Headings Example</title>
</head>

<body>
    <h1>First Heading</h1>
    This is a simple content

    <h2>Second Heading</h2>
    This is a simple content
</body>

</html>

Table of Contents