Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape

HTML Headings

HTML CODES & EXAMPLES

HTML Headings

Learn how to use HTML heading tags from H1 to H6 to create clear, organized and well-structured web pages.

01

What are HTML Headings?

Understanding H1 to H6 heading elements

HTML provides six heading elements, ranging from <h1> to <h6>. These elements are used to create headings and organize the content of a webpage.

<h1> represents the highest-level heading, while <h6> represents the lowest-level heading.

02

H1 to H6 Headings

All six HTML heading levels

<h1>

Heading 1

<h2>

Heading 2

<h3>

Heading 3

<h4>

Heading 4

<h5>
Heading 5
<h6>
Heading 6
03

Basic Heading Code

Simple HTML heading example

headings.html
<!DOCTYPE html>
<html lang="en">

<head>

  <meta charset="UTF-8">

  <title>HTML Headings</title>

</head>

<body>

  <h1>Main Heading</h1>

  <h2>Section Heading</h2>

  <h3>Subsection Heading</h3>

  <h4>Heading Four</h4>

  <h5>Heading Five</h5>

  <h6>Heading Six</h6>

</body>

</html>
04

Heading Levels

Difference between H1 and H6

Tag
Level
Typical Usage
<h1>
Highest
Main page or content title
<h2>
Level 2
Main section heading
<h3>
Level 3
Subsection heading
<h4>
Level 4
Smaller subsection
<h5>
Level 5
Detailed subsection
<h6>
Lowest
Smallest heading level
05

Practical Example

Create a structured education webpage

education.html
<h1>Shree Narayan Computers & Education Center</h1>

<h2>Computer Courses</h2>

<h3>Certificate Courses</h3>

<h4>Certificate in Computer Application</h4>

<h4>Certificate in Tally</h4>

<h3>Diploma Courses</h3>

<h4>Diploma in Computer Application</h4>

<h4>Advance Diploma in Computer Application</h4>
07

Live HTML Example

Run the heading code and view the result

LIVE PREVIEW
08

Practice Task

Test your HTML heading knowledge

🎯 Create Your Own Webpage

Create an HTML page about your school, college or education institute.

  • Use H1 for the main page title.
  • Use H2 for major sections.
  • Use H3 for subsections.
  • Use H4 for individual topics.
  • Try using H5 and H6 where appropriate.
`;document.getElementById( "sncecHeadingPreview" ).srcdoc=code;}document.addEventListener( "DOMContentLoaded", function(){sncecHdRun();} );

HTML Basic

  • 16/08/2026

Html Codes

  • 16/08/2026

HTML Runner

  • 16/08/2026

Leave a Reply

Your email address will not be published. Required fields are marked *