Anchor Macro
Add the Anchor macro to a page to link to a specific part of a page.
This is useful on long pages, where you want to link to specific parts of the page.
Don't see the Anchor macro? This macro isn't available in the new Confluence Cloud editor. See We're cleaning up our macros for alternative ways to link.
The example below shows an example of an Anchor macro as it appears in the editor, and as it would appear to someone viewing the page.
- Anchor macro as it appears in the editor
- Anchor macro as it appears when viewing a page (it isn't visible).
Add the anchor macro to your page
To add the Anchor macro to a page:
- From the editor toolbar, select Insert , then Other Macros.
- Choose Anchor from the Confluence content category.
- Enter the anchor name - this will form part of your link.
- Choose Insert.
You can then add a link to your macro from this page or another page.
Linking to an anchor
To link to an anchor on the same page:
- Click the Insert Link icon.
- Choose the Advanced tab.
- Enter # followed by your anchor name in the Link field. For example
#top
. - Choose Insert.
You can also link to an anchor on another page. See Anchors for more information on the different link syntax you can use.
Animation: Adding the Anchor macro to a page, then linking to that macro.
Change the macro parameters
Macro parameters are used to change the behavior of a macro.
To change the macro parameters:
- In the editor, click the macro placeholder and select Edit.
- Update the parameters as required then select Insert.
Here's a list of the parameters available in this macro.
Parameter | Default | Description |
---|---|---|
Anchor Name | None | This is the anchor name that you will use when creating the link.
|
Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example
).
Other ways to add this macro
Add this macro as you type
Add this macro using wiki markup
This is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.
Macro name: anchor
Macro body: None.
{anchor:here}