Anchor links are links that take the user directly to a specific parts of a page.
You can link to any page element that has an ID attribute:
If the page element you want to link to does not have an ID, you can add one in the Text view for the element.
- Navigate to the page you want to link to.
- Open the page in edit mode.
- Switch from Visual to Text using the tab at the top right of the editing screen.
- Locate the opening tag for the element you want to link to. Typically this will be a heading. (<h2>, <h3>) but it can be any tag.
- Add id=”a-unique-id-goes-here” to the tag as shown in the screenshot above. Note that the ID has to be unique for the page, and that it cannot include spaces if it is more than one word.
To create a link to an ID, add a hashtag and the ID to the end of the URL for the page, as shown below:
The link will then take you to the page, and automatically scroll down to the anchor.
The link can be used as a text link, in a button, in a menu or in any other location on your site or elsewhere.