Code has been added to clipboard!

HTML Heading Tricks: Learn All HTML Heading Tags Easily

Reading time 2 min
Published Mar 27, 2019
Updated Sep 30, 2019

TL;DR – HTML headings help organize the structure of a web page by providing titles and subtitles of various levels.

HTML Heading: a Definition

HTML headings name sections of a webpage. It simplifies page navigation, helping to create a pleasant user experience. Using HTML headings of different importance levels, you can convey the structure and hierarchy in your page:

Some beginners get confused between HTML headings, headers and <head> elements. The difference is explained clearly in the table below:

Element Definition
<h1> – <h6> Names sections of a web document to provide structure
<head> Contains machine-readable metadata (e.g., encoding information)
<header> Contains introductory or navigational information

Six Levels of HTML Heading Tags

There are six HTML heading tags in total: <h1>, <h2>, <h3>, <h4>, <h5> and <h6>. A smaller number means a smaller heading used to name a less important paragraph:

Example
<h1>I am the most important heading in the world</h1>
<h2>I am a less important heading in the world</h2>
<h3>I am an even less important heading in the world</h3>
<h4>I am a heading and I am not the least important</h4>
<h5>I am almost the least important heading in the world</h5>
<h6>I am the least important heading in the world</h6>

The HTML <h1> heading tags surround the most significant and most visible heading in the whole page, and the <h6> heading represents the least essential one which is almost as small as simple paragraph text.

HTML Headings: Useful Tips

  • HTML headings help search engines index the page's structure and understand its content. Thus, using well-written headings can help improve your website's findability.
  • You shouldn't use more than one <h1> element. It is also advised to nest HTML headings by the level and avoid skipping them.
Basics
Introduction
Syntax
Editors
Basic Examples
Head Section
<!DOCTYPE>
Tags and Elements
Semantic Elements
Tags Reference
Attributes
Comments
Block and Inline Elements
Forms
Form Elements
Input
Responsive Web Design
Inline Scripts
Uniform Resource Locator
Redirect
XHTML
Geolocation
Drag and Drop
Local Storage
Web Workers
Server-Sent Events
Character Encoding
Text Formatting
Quotation and Citation Elements
Headings
Paragraphs
Links
Tables
Lists
Symbols
Space
Tab
Styles
Computer Code
Layout
Classes
Colors
Images
iframes
Audio Player
Video Player
YouTube Videos
Multimedia
Canvas
SVG
<!-- -->
<a>
<abbr>
<acronym> DEPRECATED
<address>
<applet> DEPRECATED
<article>
<aside>
<audio>
<b>
<base>
<basefont> DEPRECATED
<bdi>
<bdo>
<big> DEPRECATED
<blink> DEPRECATED
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center> DEPRECATED
<cite>
<code>
<col>
<colgroup>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<dir> DEPRECATED
<div>
<dl>
<dt>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font> DEPRECATED
<footer>
<form>
<frame> DEPRECATED
<frameset> DEPRECATED
<h1> – <h6>
<head>
<header>
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<kbd>
<keygen> DEPRECATED
<label>
<legend>
<li>
<link>
<main>
<map>
<mark>
<menu>
<menuitem> DEPRECATED
<meta>
<meter>
<nav>
<noframes> DEPRECATED
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike> DEPRECATED
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt> DEPRECATED
<u>
<ul>
<var>
<video>
<wbr>