Health and Safety
Executive / Commission
Styleguide
HTML files published on the HSE website and intranet must as a minimum:
This is a short checklist for developers. Detailed guidance on other standards such as capitalisation [200KB]
and metadata is elsewhere.
We produce our content in XHTML 1.0 Strict. Declaring strict means it is easier to test and eliminate deprecated mark-up.
In order to ensure maximum interoperability, the first step is to produce valid mark-up, so every single page is tested with validation tools to ensure it is correctly coded. We also test on a range of browsers to ensure that valid semantic code works across a range of devices.
Lists must be marked up as lists, headings as headings, paragraphs as paragraphs and so on.
Although mark-up such as <div class=”blackTextRedBackground”> is fully valid and accessible. If we alter our design it may no longer be black text on a red background. Better to use names that indicate the function of the style such as <div class=”highlight”>.
Similarly we don’t use Div or Span if we can simply mark-up the paragraph, list item, list or heading etc.
All pages should meet the Web content accessibility guidelines (WCAG) level AA, meaning they satisfy priority level one and two. The online team will use a variety of machine and manual tests to satisfy themselves that this standard has been achieved.
The HSE website and Intranet use JavaScript to add an extra layer of usability, but in such a way that none JavaScript users can still use the site. Therefore Javascript is not banned, it is OK so long as it works along with the scripts we already use and it either increases usability or engagement.
This page describes the “technical” standards. It goes without saying that content must also be checked for spellings and grammar before passing to the online team for publishing. Please refer to the authors section for more details.
This page focuses primarily on HTML, for more information about other formats such as PDF or rich media please refer to the appropriate section of the styleguide.