skip to content

IT Help and Support

University Information Services
 

This page covers:

 

When to use anchor links

You can use a list of anchor links to take users to a specific section of your web page. They can help users quickly find content they are looking for.

You can use them a bit like a table of contents at the start of the page so that users can skip to the content they are looking for.

They can be helpful if you have a longer web page.

Be aware that anchor links cannot be redirected, only the page URL can be redirected.

 

When to avoid anchor links

  • Avoid using anchors if linking to specific section of content on a different page. Anchors can be disorientating for users if they're taken to midway point on a new page.
  • Do not use anchors to try and avoid reorganising and rewriting your content. Very long pages should be edited or split into multiple pages.

 

Content standards for anchor links

  • Make sure that the link text matches the subheadings that they link to.
  • Include a lead in line at the top of your web page before your list of links. For example, 'On this page' or 'This page covers'.

 

How to create anchors

Identify the page section you would like to link to. This is usually a subheading. Place your cursor before the subheading or the place you want to link to.

Select the Flag icon in the rich-text editor.

Name your anchor appropriately. The anchor name should be something short and easy to remember. You can use dashes to separate words but do not use spaces. For example, 'related-links'.

Select 'OK'.

 

 

Now you’re ready to create a link to the anchor you just made.

Select the text you want to turn into a link then select the chain icon. Change the Link Type to “Link to anchor in the text”. In the section “By Anchor name” choose the appropriate anchor.

Select 'OK'.

 

 

Save your changes and test the anchor link.

Get help

If you need help with your Drupal website, please contact the Drupal team via webmaster@admin.cam.ac.uk.

Content editors and website owners around the University should sign up for the Optimise your content course. This is a 6 session course run by the University's Content Community. It will help you improve your website content before it's moved to the new Drupal 10 platform.