HTML Headings


HTML headings are used to define titles and subtitles on a webpage. Headings help organize content and make it easier for users and search engines to understand the structure of a page.

Headings are very important for readability, accessibility, and SEO. Every webpage should use headings correctly.

HTML provides six levels of headings, starting from <h1> to <h6>.

<h1> is the most important heading and <h6> is the least important. The size of the text decreases as the heading level increases.

In this example:
- <h1> represents the main title of the page
- <h2> and <h3> are used for sections and subsections
- <h4> to <h6> are used for less important headings

Headings should be used in order and should not be skipped randomly.

Rules for Using HTML Headings

  • Use only one <h1> per page
  • Do not skip heading levels
  • Use headings for structure, not for styling
  • Keep heading text meaningful and clear

The example above shows incorrect heading order. Skipping heading levels can confuse users and search engines.

Always maintain a logical order when using headings.

Why Headings Matter for SEO and Jobs

Search engines use headings to understand page content. Proper use of headings improves SEO and accessibility.

Professional developers are expected to write semantic and structured HTML using correct heading levels.

Practice Task

Create a simple page structure using <h1>, <h2>, and <h3> to represent a blog post with sections and sub-sections.

What You Will Learn Next

In the next lesson, you will learn how to use paragraphs to write and organize text content in HTML.