Rules

Secret ingredients to quality software

Do you use heading tags where appropriate (H1, H2, H3...)?

Last updated by Tiago Araujo on 05 Aug 2016 05:58 pm (almost 5 years ago) See History

You should  understand the hierarchy and try to use the heading tags (<H1>, <H2> or <H3>...) for titles and subtitles.

It's also important to customize these headings via CSS, making the font bigger, bold or in a different color. This way page looks nice and organized.

The following benefits of using heading tags:

  • Improves the ranking with the search engines (extra weighting is given to text in H1 and H2)
  • Makes cleaner and leaner HTML
<p><span class="Heading">Introduction</span> 
      

Lets chatter about...</p>

Figure: Bad example - using span tags and CSS classes to put headings in

<h2>Introduction</h2>

Figure: Good example - using heading styles

Related Rules

Adam CoganAdam Cogan
Tiago AraujoTiago Araujo

We open source. This page is on GitHub