HSE banner

Headings

Proper heading use and nesting are essential to producing an accessible and valid document

Capitalisation and headings

HSE house style regarding the use of capitals in headings.

How to place headings

Headings should not be placed inside <p> paragraph blocks, list items or links.

Example: Placing headlines correctly

Correct:

<h2>Hamlet</h2>
<p>To be or not to be, that is the question</p>

Incorrect:

<p>
<h2>Hamlet</h2><br/>
To be or not to be, that is the question
</p>

If you wish to make your headline a link, then you should place the link inside the heading tags

Example: Headlines as links

Correct:

<h2><a href="...">News story!</a></h2>

Incorrect:

<a href="..."><h2>News story!</h2></a>

Types of heading

There are 4 types of heading allowed on any one page.

Heading 1

<H1 class="headlinehighlight"> Used for page title, should only be used once per page.

I am a heading 1

Large, bold and coloured, with a light background.

Headings with sub-headings

I am the headline

I am the subline

The above is achieved by wrapping an h1 and an h2 in a div tag with class "headline highlight"

<div class="headlinehighlight">
<h1>I am the headline</h1>
<h2>I am the subline</h2>
</div>

Heading 2

Heading 2 <h2> used for subheadings, can be used multiple times.

I am a heading 2

Normal font size, bold, coloured and tight onto top of text

Heading 3

<h3> used for sub sub headings, can be used multiple times.

I am a heading 3

Normal font size, bold and same colour as text and tight onto top of text.

Other heading styles

The following class can be used on h2 and h3 elements, to create an inverted effect. The choice of h2 or h3 will be influenced by the placement of your element inside the document structure tree. You should maintain the document structure tree correctly at all times.

Is the incident for you & your hse office?

<h2 class="headlineinverted">Headline inverted h2</h2>

Headline inverted h3

<h3 class="headlineinverted">Headline inverted h3</h3>

Headings and accessibility

To get the best from headings authors should be using a correct document structure tree. This has advantages in Word when building automatic clickable Tables Of Content and also has big advantages in terms of accessibility and search engine friendliness.

Next: Document Structure Trees - a very quick guide

Key messages!

Large text is achieved by wrapping the desired word in a <strong>

I am normal
I am large

<p class="headlinekeymessage"> I am normal<br /><strong>I am large</strong></p>

This is a Link
N.B. make sure this is duplicate of something else on the page, as there is no visual clue to it being a link.