Developer notes

Validate your code

Use HTML validation as the foundation for ensuring your page works for everyone.

Code examples

Declare a language

This affects the screenreader pronunciation.

<html lang="en">
</html>

Give your page a unique title

  • Each page must have unique <title> in the <head>
    • This includes single page dynamic apps if the URI changes during the user journey
  • Do not use the | pipe character as a divider (it is read by screen readers)
<head>
  <title>Page title - Website title</title>
</head>

Ensure users can zoom in

People with low vision need the ability to enlarge the page on mobile and desktop.

<head>
  <meta name="viewport" 
        content="width=device-width, 
        initial-scale=1">
</head>

Structure your page with landmarks

Landmarks give structure to the page for the screenreader user to be able to navigate the page by major sections.

Each page must include:

<header>
  <!-- Contains the site title -->
</header>
<nav>
  <!-- Primary navigation menu-->
</nav>
<main> 
  <!-- Main content -->
</main>
<footer>
  <!--  Site map and legal info -->
</footer>

Related web html page entries