The Anchor macro allows you to link to specific parts of a page. Anchor links can be especially useful when navigating between sections of a long document or when you want to link to a segment of a page and not to the page as a whole. Anchors are invisible to the reader when the page is rendered. There are two steps to using an anchor:
|
Creating an Anchor
You use the Anchor macro to create an anchor for content that you want to be able to link to.
To add the Anchor macro to a page:
- In the Confluence editor, choose Insert > Other Macros.
- Find and select the required macro.
Parameters
When editing, you can click on the macro placeholder and choose Edit to display the parameters for this macro in the Macro Browser.
Parameters are options that you can set for Confluence macros to control the content or format of the macro output. The table below lists parameters for this macro that can be set in the Macro Browser.
Parameter | Default | Description |
---|---|---|
Anchor Name | None; name must be supplied | This is the value for |
Linking to an Anchor or Heading
You can link to an anchor or heading that is on the same page, on another page in the same space, or on a page in another space of the same Confluence site.
To link to an anchor or heading:
- Click Link in the toolbar, or press Ctrl+K, while editing the page.
Click Advanced and enter the anchor name (or heading) into the Link box, using the following syntax:
Anchor or heading location
Link syntax for anchor
Link syntax for heading
Same page
#anchorname
#headingname
Different page
pagename#anchorname
pagename#headingname
Page in another space
spacekey:pagename#anchorname
spacekey:pagename#headingname
For more information about link syntax, see Confluence Wiki Markup.- Enter link text that will be displayed on the page, if required. If you leave the Link Text box empty, the link will display the destination page name or URL.
- Click Insert.
- Note that when linking to a heading,
headingname
is case-sensitive and must be entered without spaces - Note that when linking to an anchor,
anchorname
is case-sensitive, andpagename
must be entered with spaces as in the title.
Notes
- If you are adding an anchor to the site welcome message, it can only be linked to from another page. Internal-only links will not render.
- Page titles and links to other spaces can be combined with anchors and attachments, but you can't use attachments and anchors in the same link.
Related Topics
Take me back to the Confluence User's Guide.