An anchor is an element on the webpage that links to another location on the same page. It allows visitors to jump from one section of text to another while remaining on the same web page. Anchors improve visitor experience.
How to Create an Anchor
There are two steps. First create an anchor on the destination. Next link the text to it.
Creating an Anchor on the Destination
- Create a page or edit an existing one.
- Scroll down the page to where you want to add your destination anchor.
- Click on Source on the Editor Toolbar.
- Locate where you want the site visitor to land. Find the destination tag. It could be a heading or paragraph tag.
- For example, the heading tag for this section is "<h2> How to Create an Anchor </h2>"
- Within the tag, after the first tag add a space then type 'id="anchor_name". Give your anchor a name that will make sense when you link to it. Use all lowercase, no spaces. Separate words with "-" or "_".
- For example, inside the tag above, enter the anchor name as follows: "<h2 id="anchor_name"> How to Create an Anchor </h2>"
Creating a Link to the Anchor
- Scroll back up to the top of your page and highlight the text where you want your anchor.
- Click the Link button.
- Type the name of the anchor prefixed with "#".
- In the above example, it will be: "#top_of_the_page".
- Save.