Linking to an Anchor
How add anchors on pages across your site.
Linking to an anchor takes a user directly to a specific place on a page.
Adding an anchor is a two-step process: creating the anchor (using the Confluence Anchor Macro) and linking to it.
Adding an Anchor
- Go to Insert Macro
- Select Anchor Macro
- Enter anchor name (For example, 'top' or 'specific section)
- Select Insert
Creating a Link to the Anchor
Link to an anchor on same Confluence site:
- Go to Insert Link
- Choose Advanced
- Type # followed by anchor name in Link field
- Depending on whether you are adding an anchor on the same page, different page in same space, or page in different space you'll want to choose the related syntax:
Anchor location | Link syntax for anchor | Examples |
---|---|---|
Same page | #anchor name | #top #specific section |
Page in same space | page name#anchor name | My page#top My page#specific section |
Page in a different space | spacekey:page name#anchor name | DOC:My page#top DOC:My page#specific section |
b. Enter or modify the Link Text field
c. Select Insert
Link to an anchor from another web page or another Confluence site:
- Go to Insert Link
- Choose Web Link and add a full URL using syntax below:
Enter or modify the "Link Text" field
3. 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.
- Find out more about the specifics around creating different kinds of anchors on Anchors or Insert Links and Anchors
- Looking for the insert macro keyboard shortcut?
- {