HTML Headings


❮ Previous Next ❯

What is an HTML Headings?

HTML headings are used to define titles or subtitles of the content of a web page.
There are six types of HTML heading tags, i.e. from h1 to h6 .
<h1> defines the most important heading. <h6> defines the least important heading.
Always use HTML headings only for headings of content, do not use heading for BIG or bold text


Example

<h1>HTML Heading 1</h1>
<h2>HTML Heading 2</h2>
<h3>HTML Heading 3</h3>
<h4>HTML Heading 4</h4>
<h5>HTML Heading 5</h5>
<h6>HTML Heading 6</h6>
Try It »

Heading Styling

All six HTML headings has a default size. We can define the size or color of any heading with the style attribute, using the CSS font-size and color property.

Example

<h1 style="font-size:50px; color:orange;">HTML Heading 1</h1> Try It »

Importance of Headings

  • Headings make it easier for readers to navigate a web page.
  • Headings improve the accessibility of a web page.
  • Search engines use headings to understand the structure and content of a web pages, which can help improve the page ranking in search results.