<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?
You can do so anywhere in the <body></body> tag to make the link not have an underline. Defining a style property this way is called inline styling. The style is specified "inline," in the element itself, in the body of your page.
In CSS, the hyperlinks are underlined by default. This is due to the default decoration that is imposed by HTML/CSS. To get rid of this underline, we need to do the following changes in the default decoration of the anchor tag using CSS. We can get rid of underlying hyperlinks by using CSS text-decoration property.
To remove underline from a link in HTML, use the CSS property text-decoration. Use it with the style attribute. The style attribute specifies an inline style for an element. Use the style attribute with the CSS property text-decoration to remove underline from a link in HTML.
<a href="#" style="text-decoration:none !important; text-decoration:none;">BOOK NOW</a>
Outlook will strip out the style with !important
tag leaving the regular style, thus no underline. The !important
tag will over rule the web based email clients' default style, thus leaving no underline.
I see this has been answered; however, I feel this link provides appropriate information for what formatting is supported in various email clients.
http://www.campaignmonitor.com/css/
It's worth noting that GMail and Outlook are two of the pickiest to format HTML email for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With