You are currently viewing How To Add Headings To A Web Page In HTML

How To Add Headings To A Web Page In HTML

HTML Headings

  • Headings in HTML are defined with h1 to h6 tags.
  • h1 tag defines the most important heading on the web page and the h6 tag defines the least important heading on the web page.
  • All headings in HTML have pre-defined sizes.

When we define heading h1 to h6 a style of that heading will automatically be inserted. We can check the style of that particular heading by inspecting elements.

However, you can change the default size and style of the heading using CSS.

The Search Engine uses headings for indexing the content and structure of a web page. Headings are also used to determine how much the topic is important.

Below is the syntax to write HTML headings.

headings source code image

Output

Heading's Demo

This is the heading with h1

This is the heading with h2

This is the heading with h3

This is the heading with h4

This is the heading with h5
This is the heading with h6