Users may add HTML (HyperText Markup Language) anchor links to a page to help assist readers with navigation. Anchor links are shortcuts that lead from one section of a page to another section on the same page.
Instructions
- Log in to your website solution
Note: Website preferences may change what this looks like, but adding "/admin" to your website's URL will take you to a sign-in screen for administrative login - Navigate to the page you wish to add anchor links to
- Ensure that the Live Edit state is toggled to ON:
- In the Live Edit pane, click the Widgets tab:
- Drag and drop an Editor widget to your page:
- Create your content in the front-end (default) view of the Editor widget:
- Click the Code View button on the Editor widget toolbar:
- Navigate to the desired section and add the HTML attribute <p id="name"> next to the words you want to link to:
Note: Replace the word name with a specific term/name for each intended anchor link. Leave the quotation marks as part of the code. - Locate the text that you intend to link to the anchor you just created and add the HTML code <a href="#name">[text]</a>:
Note: Replace the name with the specific term/name used in step 7, and leave the quotation marks and pound sign/hashtag.
Note: Make sure that after the link text, you close the HTML link with a </a>. - Click on the Code View button again to return to the front-end (default) view:
- Review the results by checking that the linked text appears as a link. The anchored section from Step 7 should appear as plain text:
- Click the Done Editing button to exit the Editor widget:
- Click the Save button on the Live Edit bar:
- Click the Actions button:
- Click the Preview Current Page option to view your page in Preview Mode:
- Click on the Anchor link from Step 9 and ensure that it correctly directs to the anchored section:
Feedback About the Article
Let us know what was helpful or not helpful about the article below.2 comments
Hello, I'm finding this confusing to follow. The example from step 7 to step 8 don't really match (step 7 uses Upcoming Event as the name and Step 8 uses More Events as the name.
And I think the code in step 7 isn't correct, it doesn't match the screenshot. When I did try this, although I think I figured out what the instructions were trying to show, the anchor doesn't really anchor to the correct area of the page.
The anchor attribute appears to work correctly on a phone (or with a narrow browser display on a desktop) but not on a regular browser screen. As a result, we can't really "cheat" on the location of the id or label tag to make it work accurately on the desktop because then it would be off on a mobile device. Is there a workaround for this?
Please sign in to leave a comment.