Linking to Text Within a Page (Anchor Links)

Tags Drupal web CMS

Uses an HTML tag called an "anchor".

In the WYSIWYG editor in Drupal:

  • Place your cursor where you wish to insert the anchor
  • Click the anchor icon:  (usually far bottom right icon in WYSIWYG editor)
  • Assign an ID attribute (usually a short word  that signifies the content you want to linked)
    • Typically it's best to use all lowercase as some browser are case-sensitive
  • Save the page

When linking to the page, use the URL + #anchor-id

eg. "details" anchor ID becomes https://sitename.viu.ca/pagename#details