Links

Links are used as navigational elements. They navigate users to another location, like a different site or resource.

Links should be blue and underlined by default. If your link is at the end of a sentence or paragraph make sure the linked text does not include a full stop.

<a href="#" class="govuk-link">govuk-link</a>

See Link text

Links without a visited state

Use the govuk-link--no-visited-state modifier class where it is not helpful to distinguish between visited and unvisited states, for example when linking to pages with frequently changing content such as the dashboard for an admin interface.

<a href="#" class="govuk-link govuk-link--no-visited-state">govuk-link govuk-link--no-visited-state</a>

External links

If you're linking to a non-government website, make the link text clear. For example, ‘read advice on writing link text from [name of organisation]’. There’s no need to say you’re linking to an external site. Do not use an external link icon.

Opening links in a new tab

By default, links (internal and external) should open in the same tab. Links opening in a new tab can be disorienting - and can cause accessibility problems for people who cannot visually perceive that the new tab has opened.

If you need a link to open in a new tab - for example, to stop the user losing information they’ve entered into a form - then include the words ‘opens in new tab’ as part of the link (there’s no need to say ‘tab or window’, since opening in a new tab is the default behaviour for most browsers).

Include rel="noreferrer noopener" along with target="_blank" to reduce the risk of reverse tabnabbing. The following example shows how to do this in HTML.

<a href="#" class="govuk-link" rel="noreferrer noopener" target="_blank">govuk-link (opens in new tab)</a>

If you’re displaying lots of links together

To save space and avoid repetition, consider:

  • adding a line of text before the links saying ‘The following links open in a new tab'
  • including <span class="govuk-visually-hidden">(opens in new tab)</span> as part of the link text, so that part of the link text is visually hidden but still accessible to screen readers"

Links on dark backgrounds

Use the govuk-link--inverse modifier class to show white links on dark backgrounds, for example, in headers, custom components, and patterns with darker backgrounds.

<a href="#" class="govuk-link govuk-link--inverse">govuk-link govuk-link--inverse</a>

Links without underlines

Use the govuk-link--no-underline modifier class to remove underlines from links.

Only do this if the context tells the user that the text is a link, even without the underline.

For example, links in a header or side navigation might not need underlines. Users will understand that they’re links because of where they are, at the same place, across different pages.

<a href="#" class="govuk-link govuk-link--no-underline">govuk-link govuk-link--no-underline</a>