Back link
Use the back link component to help users go back to the previous page in a multi-page transaction.
Although browsers have a back button, some sites break when you use it - so many users avoid it, instead of losing their progress in a service. Also, not all users are aware of the back button.
<a href="#" class="govuk-back-link">Back</a>
{% from "govuk/components/back-link/macro.njk" import govukBackLink %}
{{ govukBackLink({
text: "Back",
href: "#"
}) }}
When to use this component
Always include the back link component on GOV.UK question pages.
You can include a back link on other pages within a multi-page transaction, if it makes sense to do so.
When not to use this component
Never use the back link component together with breadcrumbs. If necessary, you should do research with your users to learn which they find more helpful in your service.
How it works
Always place back links at the top of a page, before the <main>
element. Placing them here means that the ‘Skip to main content’ link allows the user to skip all navigation links, including the back link.
Make sure the link takes users to the previous page they were on, in the state they last saw it. Where possible, ensure it works even when JavaScript is not available.
If this is not possible, you should hide the back link when JavaScript is not available.
There are 2 ways to use the back link component. You can use HTML or, if you are using Nunjucks or the GOV.UK Prototype Kit, you can use the Nunjucks macro.
Help improve this page
To help make sure that this page is useful, relevant and up to date, you can:
- share your research or feedback on GitHub
- propose a change – read more about how to propose changes in GitHub
Need help?
If you’ve got a question about the GOV.UK Design System, contact the team.