KB User's Guide - Documents Tab - How to Create Anchor Tags and Links

If you need to link to a specific section within a document, you can do so by using an anchor and a link that points to that anchor. This document contains step-by-step instructions on how to add anchor tags and links to your documents using the WYSIWYG editor.

Note: These instructions may vary slightly by browser.

Start by going into KB Admin Tools and opening the Documents tab. Either create a new document or edit an existing document. Be sure the editor is in WYSIWYG (Design) mode.

Perform the following steps in the Body field of the document editor:

Create the anchor for the section to which you want to link

  1. Enter the text that will serve as the anchor and select it. Usually this is the heading for your section. Click the Anchor button as shown below in the WYSIWYG Editor. If you are in the HTML Editor, look for the    button.

    18575_anchor_06.png

  2. Enter an anchor name. This should be one word with no spaces.We do not recommend using underscores to separate words because and underscore would be difficult to identify when linked. You could capitalize the second word, for example, "UsefulTips" would work well. Please remember what you entered here, as it will be used when you create your link to this anchor. Click OK.


  3. Give your anchor a title. This should roughly match the heading of the section or otherwise describe the content near the anchor. Click OK.


  4. The text you selected in step 1 should now be preceded by an anchor icon and subtly underlined. This means your anchor has been successfully inserted.

    18575_anchor_09.png

Create a link that points to that anchor in the same KB document.

**to create a link that points to a completely different KB document, click here.

  1. Type the text that will serve as the link. For example:

    18575_anchor_01.png

  2. Highlight that text and click the Link button as seen below in the WYSYWIG Editor. If you are using the HTML Editor, click on the button.

    18575_anchor_02.png

  3. Enter the target URL of the link. This should be the name of the anchor you entered previously prefaced with a # character. Click OK.


  4. Enter the title for your link. This text should roughly match the text you entered in step 1. Click OK.


  5. You will be asked if the link you just entered should open in a new window. Consider your answer and then either click the OK button for yes or click the Cancel button for no. We generally recommend that you use the existing window.



Create a link that points to that anchor on another KB document

To point to an anchor on a different KB document, you need to add a little more text in the target URL of the link field, so the browser knows that some of the current URL will also change.

The full URL of a KB document looks like this: https://kb.wisc.edu/YourKBSiteNameHere/page.php?id=12345 or https://kb.wisc.edu/YourKBSiteNameHere/internal/page.php?id=12345.

  1. Enter the last part of the URL (for example: page.php?id=12345#anchor_name)in the Enter the target URL of the link: field.

    Everything before that part of the URL will remain the same (so you would be loading the page in the same KB space), but the browser will now load the correct document before checking for the presence of the anchor name.

  2. Enter the title for your link.
  3. useful_tips_link_name

  4. You will be asked if the link you just entered should open in a new window. Consider your answer and then either click the OK button for yes or click the Cancel button for no. We generally recommend that you use the existing window.



Keywords:add anchors tag link to section link within a page link points to anchor a href tag point hashtag syntax automatic anchors   Doc ID:18575
Owner:Teresa A.Group:KB User's Guide
Created:2011-05-16 18:00 CSTUpdated:2016-11-16 16:00 CST
Sites:KB Demo, KB Demo - Child Demo, KB User's Guide
Feedback:  5   0