- Advertisement -

HTML Headings


Get real time updates directly on you device, subscribe now.

HTML Headings

Headings are represented by the <h1> to <h6> tags. The <h1> element represents the first level heading. Headings (from <h1> to <h6>) define in the implied sections in the webpage and arrange its contents in a hierarchical arrangement.



<h1>Heading Level 1</h1>
<h2>Heading Level 2</h2>
<h3>Heading Level 3</h3>
<h4>Heading Level 4</h4>
<h5>Heading Level 5</h5>
<h6>Heading Level 6</h6>

Headings and SEO

Headings are very important because Search engines use them for indexation, especially when dealing with the structure and content of the document.

Moreover, it is beneficial also to users who skim your pages by its headings. Heading should be used for the purpose of structuring your content in sub-topics;

<h1> tag should be used for main headings, followed by <h2> tags, then the less important <h3>, and so on. Use HTML headings for headings only. Don’t use headings to make text BIG or bold.



The next illustration shows how <h1> can be combined with <p> and <section> elements.


<h1>Heading 1</h1>

<p>Pentbooks provide free tutorial for young and seriuos people. This lessons shall enable you to design webpages</p>

<h2>Heading 2</h2>

<p>The second level heading is to say that I am a sub topic</p>


<p>More samples here.</p>

<h4>Heading 4</h4>

<p>More samples here</p>

<h5>Vocal works</h5>

<p>More samples here</p>

<h6>Musical style</h6>

<p>More samples here</p>



The heading element used to have Attributes such as align and style. The horizontal alignment of the heading. There are four possible values:

  • center: heading is centered.
  • left: heading is aligned to the left margin.
  • right: heading is aligned to the right margin.
  • justify: heading is justified or aligned to both margins.

However, HTML5 requires that such attributes must be written in the stylesheet.

1 Comment
  1. Sampson R. Ampiaw says

    Learn a career from this website

Comments are closed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. AcceptRead More