An anchor is a link which points to a part of the same page.
You can add Anchors to a text when writing a page or post, using the HTML editor.
Click here to view the example that points you at the bottom of the page.
This is the anchor we inserted in HTML editor in order to create the link above:
<a href=”#example”> Click here </a>
An anchor can be either the origin or the target (destination) end of a hyperlink.
With the attribute href the anchor becomes a hyperlink to either another part of the document or another resource (e.g. a webpage) using an external URL.
Links are specified in HTML using the <a> tag.
The <a> tag can be used in two ways:
- to create a link to another document, by using the href attribute
- to create a bookmark inside a document, by using the name attribute
In order to create an anchor, go to HTML editor, target the text which you want the user to click on and insert the following anchor
<a href = “#5> anchor text for #5 </a>
Then go to the text which you want the user to be sent to, down the post and insert the following anchor:
< a name = “5” > anchor text for #5 < / a >
The <a href = “#5> and < a name = “5” > tags and their corresponding close tags </a> are the important part – the text shown here as “anchor text for #5 anchor” can be anything you want.
Example of adding anchors:
This is the anchor we inserted in HTML editor in order to create this anchor: