How to Add Anchor Links: Step-by-Step Guide for Page Navigation

How to Add Anchor Links: Step-by-Step Guide for Page Navigation

By Michael Turner

January 10, 2025 at 05:31 AM

Anchor links allow visitors to navigate directly to specific sections of your webpage. Here's how to create them:

Step 1: Add a code block to the target section

  1. Scroll to where you want the link to point to
  2. Add a code block
  3. Insert this code, replacing "unique-ID" with your identifier:
<div id="unique-ID">This is where the link will take you</div>

code editor in dark theme

code editor in dark theme

Step 2: Create the link

  1. Add the link text in a text block
  2. Format the URL as:
    https://yoursite.com/page/#unique-id
  3. The full URL format should be:
    https://examplesite.com/pageslug/#unique-id

Step 3: Save and publish changes

Key Best Practices:

  • Use unique identifiers only once per page
  • Make identifiers case-sensitive
  • Include full URLs for most links
  • Keep identifiers memorable and logical
  • Target text will display at the top of browser

Yellow arrow points to text

Yellow arrow points to text

Creating Space Before Target Text:

  • Add
    &nbsp;
    tags to create space
  • Each tag adds one line of space

Empty rectangle with yellow border

Empty rectangle with yellow border

Troubleshooting Tips:

  1. Verify the full URL is correct
  2. Check identifier spelling and capitalization
  3. Ensure quotes are "straight" not "smart"
  4. Test while logged out or in incognito mode
  5. Confirm header's Fixed Position setting
  6. Check for duplicate IDs

Mobile Considerations:

  • Behavior varies by device and browser
  • Full URLs may cause page reloads
  • Alternative formats may work better for mobile
  • Test thoroughly across devices

Remember to update links if you change your domain or page slugs to maintain functionality.

Related Articles

Previous Articles