Anchor links only working in browser but not in in HTML email (Outlook)

后端 未结 7 1291
再見小時候
再見小時候 2020-12-20 16:40

I have an HTML email generated from a Windows application. The template used for this is designed in .aspx page. The email has some links at top of the page which should tak

相关标签:
7条回答
  • 2020-12-20 16:50

    I found that placing the tag

    <base href="" />
    

    in the head section worked for me (Outlook 2013) with the standard anchor tag. I found this fix on this page CampaignMonitor

    0 讨论(0)
  • 2020-12-20 16:55

    Sample PDF

    '<base href="" />' 
    

    Adding the base tag in header and add the name attribute in anchor work for me

    0 讨论(0)
  • The id/name attribute is like a variable name, for more cross compatible support it really should not have symbols or spaces in the first place.

    Think how that would look in the address bar:

    • webpage.html#Wickr%20raises%20%249%20mln%20as%20Alsop%20Louie%2C%20Juniper%20Networks%20invest%20%7C%20Reuters%20

    So I guess the silly answer is not to use spaces... That being said, I've noticed both outlook and winword will edit your hyperlink in different ways depending on the prefix "File:" or "http:". Hopefully that helps.

    0 讨论(0)
  • 2020-12-20 17:04

    Try to always give http at the start of the URL as follows,

    <a href="http://www.website.com/"></a>
    

    If not it will not work in outlook. It worked for me. Hope this helps!

    0 讨论(0)
  • 2020-12-20 17:14

    So you have coded your anchor tags like such:

    <a name="test">Wickr raises $9 mln</a>
    <a href="#test>Wickr raises $9 mln</a>
    

    And this is still not working? You should also have a look at campaign monitor for supported browsers. I haven't coded emails in a while, but I remember it was always quite a hassle.

    0 讨论(0)
  • 2020-12-20 17:14

    I tested the following code in Outlook2007 and Outlook2013. It works.

    The anchor tag:

    <a href="#Test Link">Test Link</a>
    

    And the Target:

    <p><a name="Test Link"></a>Test Link</p>
    
    0 讨论(0)
提交回复
热议问题