This page shows 2 easy ways to change the color of hyperlinks using CSS code.
The first way is on-the-fly with Inline CSS by adding the style attribute directly into the hyperlink code, inserting a color property into the style attribute then giving the color property a color value. Hyperlink colors can also be changed easily with external CSS (examples below).
Replace the URL,
href attribute value, and the color property value
#cc0000 with your own. See hex color chart and color names chart to get more colors.
Code – HTML with Inline Style
Internal or External CSS Examples
Code – CSS
One of the major benefits of using an external stylesheet is that you can control all hyperlinks on an entire website by simply editing one file. Another good benefit is that many cool hyperlink effects can be achieved to improve the look and feel of your website. Instructions for external stylesheet.