Better Connected, Better Results: Headings

Structure is important.

A house wouldn’t be a house without structure - it’d be a pile of bricks and mortar, with some windows and doors.

Now, while you can’t have a house without structure, unfortunately, you can build a web page without any structure.

It’s not hugely useful though, so to help you make sure your pages are useful to your users, here’s our How To Do Headings guide.

The rules for Headings are simple:

  • Every page must have at least one (the H1)
  • Only one H1 per page
  • The H1 must be applied to the main heading of the page
  • The H1 should ideally be the first heading in the source code
  • Subheadings of any heading should be given the next heading level down (e.g., H2 for subheadings of H1, H3 for subheadings of H2, etc.)
  • No jumping levels (e.g., H1 to H3)
  • Everything that’s actually a heading needs to be coded as a heading, not just made bold.
  • No using heading tags to make text bigger or smaller

The H1 (aka The Main Heading)

On the Home Page, the main heading is likely to be the site name. It can’t really be anything else.

On other pages, it’s the main heading of the document, not the site name, and there some very good reasons for that.

Using Word documents as an analogy - you wouldn’t use the organisation name as the level one heading on every document produced, because the level one heading quite rightly identifies the content of the document, not the organisation that produced it.

Secondly, there is no concept of site in HTML, each page is a document which is intended to be treated on its own.

Thirdly, the name of the website will be the first, or close to the first piece of content on the page because it’ll be included in the page title, and also in the alt text for the logo, or even in plain text at the top of the page adjacent to the logo. All of these things provide context to the user. They’re highly unlikely to be confused as to which site they’re on if the site name isn’t the H1.

Fourthly, there’s a potential risk to search engine optimisation. By placing the organisation name in H1 tags on each page, you lose the boost to ranking gained by placing the actual title of the page in H1 tags. You may gain places for people searching for you by name, but you’ll potentially lose for people searching by subject.

On most sites, the site name is either text, or an image of text (usually the logo) with appropriate ALT text. If you’ve gone down the logo road, you can quite happily put your H1 tags around this image, and the ALT text will function as the H1 text. If you’ve got your site name in text, and you want it to look the same whether it’s the H1 (on the Home Page) or a P (on any other page), then you can create a CSS class which has all the style info you want to use and apply it where necessary.

Same look, different tag, proper heading structure.

(and before anyone comments, yes, we know that the blog name is the H1 on every page when it shouldn’t be. This is a Wordpress thing that we’re trying to get changed.)

H2 (aka Sub-headings, Second level headings and/or Section headings)

It’s quite easy really. Anything that’s an immediate sub-heading of the H1 has to be an H2.

If you want to name your sections and include these sections in the heading structure then these should be marked up as H2, along with any subheadings within the main content of the document.

You don’t have to include section headings in your heading structure for pages, but if you’ve got more than just main and secondary navigation, it’s probably worth thinking about. A really good example of a site that’s just crying out for this kind of heading struture is the BBC News website.

H3, H4, H5 and H6

Subheadings of H2s are H3s.

Subheadings of H3s are H4s.

And so on.

A tip though: if you’re using lots of H4s, H5s and H6s, then you should probably consider splitting your pages into smaller, separate pages.