Create in Article Anchor Links

Overview

When articles become lengthy including the use of in-page anchor links can improve customer's navigation and access to the content. They allow the reader to jump directly to specific sections of an article when referenced from another section, such as a table of contents (TOC) at the articles beginning, without endless scrolling. This article provides information on how to create an HTML anchor tag, and then how to create a link to the anchor. The example is used in the context of a TOC; however, the concept applies to any use-case where anchors would be useful.

Unless an article is short, if it has three or more headings it is suggested to include a table of contents in the form of a bulleted list. Most of the time you will not need TOC links to headings below H3 unless it is a complex article; however, it is a judgment call of how "deep" to make the TOC. When creating a TOC the standard preceding phrase which should be used is "In this article:". This phrase should be in the bold style; however, it should not be in an HTML header (e.g. H2, H3, etc.) format.

In this article:

Making an anchor

Before creating a link, it is necessary to create a link anchor. The following steps will guide you through the process of creating an anchor.

  1. Locate the text you want to create an anchor for.
  2. Place the cursor before the text.
    • Do not select/highlight the text. That would format the text like a link.
  3. Click the Anchor button.
    Knowledge article editor insert anchor button highlighted
  4. Enter the name of the anchor.
    Knowledge editor Anchor Properties dialog window
  5. Click Ok.

Linking to an anchor

After an anchor is created you can then use the link to create an entry in the table of contents. The following steps will guide you through the process of creating a TOC link.

  1. Select the text that you want to link to the anchor.
  2. Click the Link button.
    Knowledge Article editor link button highlighted
  3. In the Link dialog window, click the Link Type drop-down menu, and select Link to anchor in the text.
    Knowledge article editor link dialog link type drop-down menu
  4. In the Select an Anchor section click the By Anchor Name drop-down menu, and select the desired anchor text.
    Knowledge editor link dialog select an anchor drop-down menu
  5. Click Ok.