Skip to content
Use the skip to content component to allow assistive technology and keyboard-only users to skip to the main content on a page.
This helps these users bypass repeated focus on persistent page elements, such as top-level navigation.
All Office for National Statistics (ONS) pages must use the skip to content component above the header to fulfil WCAG 2.1 criterion 2.4.1 (opens in a new tab)
To view this component tab to the example, or click inside this example and press the tab key
How to use this component
The component is visually hidden until it is brought into focus with a keyboard press.
It should be the first element of page content, or immediately follow the cookies banner.
It should link to the page’s <main>
element using the id
for the anchor link.
Base page template
The skip to content component is automatically included and links to the main
element with an id
of “main-content”, if you are using the base page template.
You can override this by manually adding it using the skipLink
block.
Help improve this page
Let us know how we could improve this page, or share your user research findings. Discuss ‘Skip to content’ component on GitHub (opens in a new tab)