How do I remove link underlining in my HTML email?

2019-02-02 05:43发布

<td width="110" align="center" valign="top" style="color:#000000;">
    <a href="https://example.com" target="_blank"
       style="color:#000000; text-decoration:none;">BOOK NOW
    </a>
</td>

I used this code to make a link in my HTML email. In browsers and Outlook it's working nicely, but in GMail, Hotmail, and ymail it shows links underlined.

Can anyone help me to get rid of this?

21条回答
相关推荐>>
2楼-- · 2019-02-02 06:31

After half a day looking into this (and 2 years since this question was opened) I believe I have found a comprehensive answer to this.

<a href="#"><font color="#000000"><span style='text-decoration:none;text-underline:none'>Link</span></font></a>

(You need the text-underline property on the span inside the link and the font tag to edit the colour)

查看更多
做个烂人
3楼-- · 2019-02-02 06:31

I added both declarations on the a href which worked in outlook and gmail apps. outlook ignores the !important and gmail needs it. Web versions of email work with both/either.

text-decoration: none !important; text-decoration: none;
查看更多
看我几分像从前
4楼-- · 2019-02-02 06:32

I think that if you put a span style after the <a> tag with text-decoration:none it will work in the majority of the browsers / email clients.

As in:

<a href="" style="text-decoration:underline">
    <span style="color:#0b92ce; text-decoration:none">BANANA</span>
</a>
查看更多
虎瘦雄心在
5楼-- · 2019-02-02 06:35

Text decoration none was not working for me, then i found an email in outlook that did not have the line and checked the code:

<span style='font-size: 12px; font-family: "Arial","Verdana", "sans-serif"; color: black; text-decoration-line: none;'>
<a href="http://www.test.com" style='font-size: 9.0pt; color: #C69E29; text-decoration: none;'><span>www.test.com</span></a>
</span>

This one is working for me.

查看更多
甜甜的少女心
6楼-- · 2019-02-02 06:35

You should write something like this.

<a href="#" style="text-decoration:none;">BOOK NOW</a>
查看更多
Rolldiameter
7楼-- · 2019-02-02 06:38

In Windows 10 Mail, you might need to add these in your html head:

<!--[if (mso)|(mso 16)]>
  <style type="text/css">
    body, table, td, a, span { font-family: Arial, Helvetica, sans-serif !important; }
    a {text-decoration: none;}
  </style>
<![endif]-->

The 'a {text-decoration: none;}' fixed the underline problems :)

查看更多
登录 后发表回答