Master AI & Build your First Coding Portfolio with SkillReactor | Sign Up Now

Lesson 2 - HTML Tags And Elements

2.1 Headings

Headings in HTML

Headings in HTML allow you to create titles and subtitles, organising content into hierarchical sections. HTML offers six levels of headings, each denoted by the <h1> to <h6> tags:

  • <h1> - This is the largest and most important heading.
  • <h2> - Slightly smaller than <h1>, used for major sections of the page.
  • <h3> - Used for subsections within <h2> sections.
  • <h4>, <h5>, and <h6> - Successively smaller headings, suitable for less significant divisions of content.


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

In this example:

  • Each <h> tag defines a different level of heading.
  • Use these tags to structure your content logically and help users navigate your webpage efficiently.

Understanding how to use headings effectively enhances readability and accessibility of your web content.