Change color of hyperlinked text in email after clicked | Community
Skip to main content
Level 2
October 10, 2013
Question

Change color of hyperlinked text in email after clicked

  • October 10, 2013
  • 4 replies
  • 4059 views
Hi,
Does anyone know how I can change the color of a hyperlink in an an email after someone clicks on it.  So instead of changing to purple I can make it another color, or even not have it change color at all?

Thanks,
Atara
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

October 10, 2013
You can use these stylesheet settings:

a {
	color: blue;
	text-decoration: underline;
}

a:active {
	color: yellow;
	text-decoration: none;
}

a:link {
	color: blue;
	text-decoration: underline;
}

a:visited {
	color: purple;
	text-decoration: none;
}

a:focus {
	color: red;
	text-decoration: none;
}

a:hover {
	color: red;
	text-decoration: none;
}

but in an email it would be better to use it inline.
Unfortunately this is not possible.

To prevent colors of changing at all you should use:
<a href="www.domain.com/path" style="color:#000000;text-decoration:none;">download</a>
By adding the color to the style of the hyperlink it will remain that color, no matter what.
The text-decoration:none; is to remove the underline, but you can also not use it, or use the value "underline".
October 10, 2013
It is easier to set it in the body-tag of your template. Where link="color" sets the color of a not visited link and vlink sets the visited link. The color is in RGB.

Example:
<body vlink="#009FE3" link="#009FE3">
October 10, 2013
Hi Peter, that's true. However this attributes are now depreciated. So shouldn't be used anymore.
http://resources.bravenet.com/articles/site_building/CSS/the_body_tag_deprecated_attributes/
October 10, 2013
I agree with Diederik. While most email clients offer a reasonable degree of backward compatibility there is no assurance it is going to last or users will have a system that support legacy tags.

It is not even limited to legacy. Yahoo Mail ignores the paragraph tag and MS-Outlook does not handle background images.

It is safer to code for the unknown email client.