I am using free WordPress online. I want to change the color of a link. When I test this code in http://www.w3schools.com, it works well:
<!DOCTYPE html>
<html>
<body>
<table style="background-color:white;width:100%;">
<tbody>
<tr valign="TOP">
<td> <img border="0" src="http://www.kuffelcreek.com/favori14.jpg" width="430" height="480" /></td>
<td>
<p><div style="color: #FF0000"><a href="google" style="text-decoration:none;" onmouseover="this.style.color='#FF0000'" onmouseout="this.style.color='#000000'">google link</a></div></p>
description
</td>
</tr>
</tbody>
</table>
</body>
</html>
However, when I pasted this code in WordPress then updated it, it automatically deleted onmouseover="this.style.color='#FF0000'" onmouseout="this.style.color='#000000'"
and the code turned out to be like this:
<table style="background-color:white;width:100%;">
<tbody>
<tr valign="TOP">
<td> <img border="0" src="http://www.kuffelcreek.com/favori14.jpg" width="430" height="480" /></td>
<td>
<p><div style="color:#FF0000;"><a href="google" style="text-decoration:none;">google link</a></div></p>
description
</td>
</tr>
</tbody>
</table>
How can I avoid WordPress deleting my code? How can I change color of link in WordPress?
To change the color of all the links using CSS, you could save this to your Appearance â Custom Design â CSS editor:
a:link, a:visited { color: #f00; }