Add anchors within articles

Anchors are a great way to navigate between or link to specific sections in your article, like manually inserting invisible bookmarks. To use anchors, you'll need to:

  1. Create the anchor itself: This is a hyperlink with an id, also known as an anchor hash.
  2. Insert a link pointing to the anchor: For same-page links, add a link that starts with # followed by the anchor hash or id. For links to anchors on other pages, use the full link followed by # and the id.

So if I create an anchor with an anchor hash of troubleshooting-tips, the hyperlink URL I'd insert to navigate to it is #troubleshooting-tips.

Thankfully, we have a tool to create the anchor, but you'll need to understand how to create links to anchors.

Don't manually create anchors for headings!
If you're thinking of creating anchors to headings, you don't have to! Use our built-in setting in Customize > Website to turn on header anchors. This setting automatically generates anchors in your live article to every heading on the page, which you can click to copy. Refer to Website settings for more information on using this setting.

If you're using the Customize > Website setting for Header anchors, skip the steps to create an anchor and jump straight to Insert a link to an anchor within the same article.

Create an anchor

To create an anchor in an article:

  1. Put your cursor where you'd like to add the anchor.
  2. Select the Insert Anchor option (which is in the shape of an anchor, between Insert Link and Insert Image)The Insert Anchor option
  3. The Anchor Hash modal opens.
  4. Enter the Anchor Hash you'd like to use. This is the id for the anchor. It can only contain numbers, letters, -, and _.
  5. Once you've finished adding your anchor hash, select Insert.
    Sample anchor hash
  6. The editor displays an anchor icon for any manually-added anchor:
    Sample manually-added anchor icon
    Select this icon at any time to review or edit the anchor hash or remove the anchor entirely. (This icon isn't displayed in the live article, only the editor!)
  7. Select Save.

Once that anchor exists, you can insert links to it either from the same article or from a different article.

Insert a link to an anchor within the same article

Once you create a manual anchor or an automatically generated header anchor exists, copy the anchor hash. Then:

  1. Select the two chain link icon for the Insert Link control in the editor:
    The Insert Link chain link control in the article editor
  2. Enter the anchor hash into the URL field with a # in front of it (for example, #troubleshooting-tips).
  3. Enterthe text you want to display for the link into the Text field (for example, Troubleshooting tips).
  4. Enter the text you'd like displayed when someone hovers over your link in the Title field (for example, Jump to Troubleshooting tips section):
    Sample link to the #troubleshooting-tips anchor
  5. Select Insert.
  6. Be sure to Save your changes to the article.

Insert a link to an anchor in another article

Before you start, you'll need to know:

  • The anchor hash
  • The article's name

Once you have this information handy:

  1. Open the article where you want to add the link for editing.
  2. Select Insert > Insert link to article or select the square icon with an arrow pointing diagonally out of it to Insert Link to Article or Category. Refer to Link to article or category for more information on this feature.
    Insert Link to Article or Category option
  3. Enter the name of the article you want to link to and set the link text.
  4. Select Insert to insert the link. 
  5. Then select the link and select Edit Link. The Edit link modal opens.
  6. The URL field displays an #badLink merge code rather than a true URL. This is how we handle references to other KnowledgeOwl articles.
  7. Add a # and the text of the anchor hash after the closing square bracket for the hg-id. For example, if our initial link looked like this: #badLink and we wanted to add a link to the #troubleshooting-tips anchor, our edited link would look like this: #badLink#troubleshooting-tips.
  8. Select Update to save your changes.
  9. Be sure to Save your article once you're done!

Use cases

Most commonly, anchors are used to handle navigation within or between articles. If you're trying to create a set of clickable headings like a table of contents at the top of an article, refer to Article Table of Contents or Topic display categories. But they can be great for quick navigation back to the beginning of an article, or for getting people directly to an often-used section.

Case one: quick navigation

Linus, our trusty Owl Documentarian, knows that some steps aren't always completed in order. Some articles have multiple headings and subheadings and he wants to be sure that people can easily find referenced steps or information.

For these kinds of articles, inserting a link to an anchor in the same article allows him to quickly cross-reference concepts in the same article and encourage exploratory navigation.

Case three: frequently-referenced information

There are some steps or pieces of information in the middle of an article that Linus finds himself sending to readers often. In his article "Your first 2 weeks as a KnowledgeOwl owl," he finds that owl recruits often need to be reminded to "Always look before you leap." An anchor is a fast and easy way to handle this. Now, instead of telling his owl recruits to go review the entire article, or to scroll to the "Always look before you leap" section, he can give them an explicit link to myknowledgebase/help/first-2-weeks#look-before-you-leap.

Let us know if you're using anchors in other ways that would make good use cases!