The {anchor} macro allows you to create an anchor (or "bookmark") within a page allowing links to jump directly to that part of the page...
There will be times when you need a link that takes the visitor directly to a specific part of a page and this macro allows you to just that by allowing you to place any number of anchors (bookmarks) within a page.
It should be noted that all headings on your page automatically create an anchor. For more information, see our tutorial on Linking to Headings and Anchors.
Parameters:
Add the macro to your page as follows:
{anchor:bookmarkName}
| Parameter | Required | Notes |
|---|---|---|
| default | The default "bookmarkName" parameter is the name that you use when you want to jump to the anchor. |
Notes
You should keep your bookmark names as simple as possible and try to avoid using spaces. If your bookmark consists of two words, eg: "my bookmark", then join them together, for example:
- MyBookmark
- myBookmark
- my_bookmark
- my-bookmark
There is no rule as to which is the best way to join the words together so just choose the format you find easiest to work with.
Examples:
Hints and Tips
When referring to something on another page, use an anchor to provide a link directly to that part of the page so the visitor can jump directly to it without having to read through everything above the relevant section - this saves them time and makes them happy!
If you want to link to a specific part of a page from an external website, bear in mind that anchor names are prefixed with the page title and some characters may be removed. If you are using the
web browser, you can install the Show Anchors Extension which allows you to quickly display all anchors on a page and copy the anchor links to the clipboard.
Frequently Asked Questions
| Q | What happens if there are two anchors with the same name? |
|---|---|
| A | The browser will go to the first one only. The same is true if you have headings with the same name. |
.png)







