Linking to an Anchor
Adding links to specific page areas.
Adding an anchor is a two-step process: creating the anchor with the Confluence Anchor Macro, and linking to it, from the same or a different page.
Insert the Anchor Macro at a chosen link location.
Enter a name for the anchor. (e.g. step-two
)
Create a Link to the Anchor.
- Insert a link
- Choose Advanced
- Add # followed by the anchor name from Step 1 into the link field
Depending on whether you are linking to an anchor on: the same page; a different page in the same space; or a page in a different space, you'll want to choose the related syntax:
Anchor location | Link syntax for anchor | Examples |
---|---|---|
Same page | #anchor name |
|
Page in same space | page name#anchor name |
|
Page in a different space | spacekey:page name#anchor name |
|
- Enter or modify the Link Text field
- This setting allows you to insert link text that differs from the linked page title
- Select Insert
Naming Anchors
Anchor names:
- are case sensitive
- must match the link you use when creating the Anchor macro
Special Characters
If the name of the page you are linking to contains special characters, where the URL displays a page ID rather than a name, the link to an anchor will be a combination of the page ID and the page name, as follows:
For the page "Test - page 1!" containing a tab named "anchor" the URL will look like this:
UTF-16 Characters
If the page name contains UTF-16 characters (eg. Simplified Mandarin, Katakana) then it is necessary to add "id-" into the URL before the second instance of the page name, as follows:
For the page "ページ" containing a tab named "High Level Comparison", the URL will look like this:
Note: You can retrieve the page ID from the address bar when the characters are not ASCII.
- Learn more about anchors: Anchors, Insert Links and Anchors