[SalesForce] Using anchor links to redirect within email

I am having trouble in linking to a specific area of webpage through the use of anchor links.

Example: <a href="http://www.example.com/page.html#myanchortag">

Whenever I include the '#' it no longer redirects the page at all. The link is still 'clickable', but the page doesn't change.

Is this something that can be achieved that I am going about the wrong way, or is it not possible?

Thanks for the help.

EDIT: Example of formatted links:

enter image description here

Best Answer

The strange thing is that I'm unable to reproduce the issue you are experiencing. I'm using Classic Content, but perhaps you are using Content Builder? Anyway, here's what I would try.

Paste the following code into your email and determine if either of the following two links work:

<!DOCTYPE html>

    var @href, @hrefEncoded
    set @href = 'https://github.com/eliotharper/custom-activity-deskapi-node#pre-requisites'
    set @hrefEncoded = URLEncode(@href)

<p>Read the <a href="%%=RedirectTo(@href)=%%">pre-requisites</a>.</p>

<p>Read the <a href="%%=RedirectTo(@hrefEncoded)=%%">pre-requisites</a>.</p>
Related Topic