Skip to main content

Adding Anchor Links using Custom HTML

Learn how to add anchor links in emails using a custom HTML block. Anchor links let readers jump from one section of your email to another.

Updated this week

Before You Begin

  • This method requires a Custom HTML block.

  • The Custom HTML block may be disabled by default.

  • If the block is not available, contact your Customer Success Manager (CSM) or the support team to enable it.

If you want to use anchor links on landing pages, check out our help document.


What Are Anchor Links?

Anchor links let readers jump to a specific section of an asset.

You can apply anchor links to:

  • Text links

  • Buttons

  • Images

This method uses a small HTML tag to mark the location where the asset should scroll.


Create an Anchor Link

Follow these steps to add an anchor point and link to it.

1. Add an HTML Section

Add a Custom HTML block directly above the section you want readers to jump to.

Dragging in an HTML content block into an asset.

2. Insert the Anchor Code

Add the following code inside the HTML block:

<span id="anchorname"></span>

Replace anchorname with the name of your anchor.

Example:

<span id="pricing"></span>
Adding the anchor code into the custom HTML block.

3. Link to the Anchor

Go to the button, text, or image that should trigger the jump.

Add the following as the link URL:

#anchorname

Example:

#pricing
Adding the anchorname value into a button link.

Preview Anchor Links

You can test anchor links directly in the Knak preview screen.

You can also test them by Exporting the email, or Syncing the content to your Marketing Automation Platform (MAP). Then open the email in an inbox.

Video Demo


Link to an Anchor on a Landing Page

You can also send users from an email to a specific section of a landing page.

Add the anchor to the end of the page URL.

Example:

https://example.com/page#pricing

Demo Video


Email Client Compatibility

Anchor links do not work in every email client. Support is about 50% across clients. Use this compatibility guide as a reference. For more details on email support, see:
https://www.caniemail.com/search/?s=anchor

iOS (iPhone and iPad)

Mail app for iOS

Outlook app for iOS

Gmail app for iOS

Yahoo app for iOS

Windows

Outlook Classic

New Outlook

Mac

Mail app

Outlook for Mac

Legacy Outlook for Mac

Android

Outlook app for Android

Gmail app for Android

Yahoo app for Android

Webmail (Chrome on a Mac)

Outlook.com

Yahoo.com

Gmail.com


Important Limitations

Some Clients Do Not Support ID Anchors

This method uses the HTML id attribute. Some clients only support the older name attribute. Those clients will not support this feature.

Outlook iOS Email Clipping

The Outlook app for iOS clips emails longer than 5000px.

When clipping happens:

  • A “Read More” button appears.

  • Anchor links may jump to the wrong location.

How to avoid this issue:

  • Reduce the email height on mobile.

  • Keep the mobile version under 5000px.


Need more help? Contact support via live chat using the chat bubble in the bottom right corner or email support@knak.com.

Did this answer your question?