Creating an Anchor Link

Have more questions? Submit a request

Anchor Links are a hyperlink which make it easier for customers to navigate to the relevant information faster. When the page loads, it will immediately jump to the content on the linked page.

If you meant a vanity URL

Vanity URLs are different to Anchor Links. If you need a vanity URL created, submit a request for support from a Content Administrator on our form.

How Anchor Links work

Anchor Links are unique. When you look at a URL with a pound sign (#) and a word after it, it is an anchor link. Here's an example:

https://www.nsw.gov.au/covid-19/business/rules-guidance/ventilation#toc-why-ventilation-is-important

This URL tells the browser to first load the page and then moves the pre-specified location to the top of the screen.

How do I create an Anchor Link?

Follow the steps below to create an Anchor Link within the CMS:

  1. Inside a WYSIWYG content block, you will find a Flag icon in the toolbar.

    The flag icon highlighted to the right of the link icon.

  2. Position your cursor where you want to place the anchor. Do not highlight the word.



  3. Click the flag icon to add your anchor.

    The flag icon can also be selected with the keyboard shortcut control plus m.

  4. Label your anchor something relevant but be sure to use lower case and add the – symbol between words.



  5. A text will be added on the editor where you placed the anchor and the Anchor Link will be highlighted in blue. Note: this additional text will not appear on the live page.

    'Invisible anchor' appears on the spot where the anchor link was created.

  6. Once you have created your anchor, its now time to link to the anchor.
  7. Highlight the text you want to link from, and click the link icon.

    The text 'about this landing page' is highlighted before clicking on the link icon.

If you are creating an anchor link within the same page follow these steps:

  1. Select the text you would like to link to in text and then enter # and the name of the Anchor Link. Remember to add the – symbol between words.

    A text highlighted with the hash symbol inside the Link URL window. The anchor link is typed as #test-anchor.
  2. Click on the green tick to create your Anchor Link. The Anchor Link will be successfully created when you see a pop up menu below the link.

The highlighted text has become a link with the anchor link popped up underneath it.

If you're creating an Anchor Link to another page, follow these steps:

  1. Select the text you want to link to. In the link URL box, start typing the name of the page you want to link to. A list of pages will appear using the text in the box so be as specific as possible when searching.

A text highlighted with the Link URL window popped up on top of it.

2. Find the page you and click on the page to select.

The text 'another page' typed on the Link URL field. A dropdown list of a matching page is shown.

 

3. If you want to link to a specific Anchor Link on the page, type # and the Anchor Link name at the end of the URL. Ignore the message 'not being found'.

The text 'Another page#anchor-link is typed on the Link URL field. No results appears under the field.

4. Click on the green tick to create the Anchor Link.

Last, save your page and the Anchor Link should jump to the anchor down the page.

 

Guidelines for using links

Learn more about using links on nsw.gov.au to make effective use of Anchor Links.

Need any more help?

If you have any questions, or require assistance with anything mentioned on this article, submit a request via the webform.

Articles in this section

Was this article helpful?
1 out of 1 found this helpful