Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove link underlining in my HTML email?

<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?

like image 600
pubudumj Avatar asked Jan 25 '12 05:01

pubudumj


People also ask

How do you make a link not underlined in HTML?

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.

Why are my links underlined in HTML?

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.

How can I remove underline from HTML?

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.


2 Answers

<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.

like image 58
Nathaniel Hoyt Avatar answered Oct 05 '22 18:10

Nathaniel Hoyt


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.

like image 34
Kennith Nichol Avatar answered Oct 05 '22 20:10

Kennith Nichol