How to Create and Use Anchor Links in Web Pages - A Comprehensive Guide
Anchor links help visitors navigate directly to specific sections of your webpage. Here's how to create them effectively:
Step 1: Add the Landing Point
Add a code block to your desired section and insert this code:
<div id="unique-id">Destination text</div>
Replace "unique-id" with your chosen identifier (use dashes instead of spaces) and "Destination text" with your desired content.
Code displayed on a gray popup
Step 2: Create the Link
- Add your link text
- Insert the full URL in this format:
https://yoursite.com/page-slug/#unique-id
- Save your changes
Image of an item list and description
Best Practices:
- Use unique IDs only once per page
- IDs are case-sensitive
- Create meaningful, memorable IDs
- Ensure URLs are up-to-date
- Test links while logged out
Yellow anchor icon
Troubleshooting Tips:
- Verify the full URL format
- Check ID spelling and case
- Use straight quotes in HTML
- Include www. if part of primary domain
- Test in incognito/private browsing
For sections that don't support blocks (like galleries):
- Add a blank section above
- Insert the anchor link
- Disable "Full Screen Display"
Mobile Considerations:
- Behavior varies by device and browser
- Consider using alternative URL formats
- Test thoroughly on multiple devices
Remember to update anchor links if you change your domain or page URLs.