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. 

On this page:

  1. Anchor macro as it appears in the editor
  2. 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:

  1. Unable to render {include} The included page could not be found.
  2. Choose Anchor from the Confluence content category.
  3. Enter the anchor name - this will form part of your link.
  4. 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:

  1. Click the Insert Link icon.
  2. Choose the Advanced tab.
  3. Enter # followed by your anchor name in the Link field. For example #top.
  4. 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

Error rendering macro 'excerpt-include'

User 'null' does not have permission to view the page.

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.

  • The anchor name can include spaces. Confluence will remove the spaces automatically when building a URL that points to this anchor.
  • The anchor name is case sensitive. You must use the same pattern of upper and lower case letters when creating the link as you used when creating the Anchor macro.

Error rendering macro 'excerpt-include'

User 'null' does not have permission to view the page.

Other ways to add this macro

Add this macro as you type

Unable to render {include} The included page could not be found.

Add this macro using wiki markup

Unable to render {include} The included page could not be found.

Macro name: anchor

Macro body: None.

{anchor:here}

Last modified on Jul 2, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.