Link colours
The answer to different coloured links is simple…
You should all know that there are “global” styles such as body, * or h1. Now the a tag also has one and so the syntax is simple:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <style type="text/css"> /* The link itself */ a:link { color: #000000; text-decoration: underline; } /* The link when it's active (it becomes active after you click on it and remains active until you deselect it) */ a:active { color: #0000ff; text-decoration: underline; } /* The link after you've clicked it once */ a:visited { color: #00ff00; text-decoration: underline; } /* The link while you hover over it with your mouse */ a:hover { color: #ff0000; text-decoration: none; } </style> |
