CSS has a special pre-defined class grouping called pseudo-classes. It is used mainly to deal with the states of links.
In regular HTML you can control the colour of links using 'link', 'alink' and 'vlink' attribute for the <body> element:
<body link="red" alink="blue" vlink="yellow">
W3schools.com, a great CSS resource
<body>
In CSS so-called pseudo-classes allow these link states to take any CSS property and value, greatly widening your creative control.
HTML | CSS | Example |
link="red" | a:link {color: white ; background-color :#3399FF; text-decoration: none} | W3schools.com, a great CSS resource |
alink="blue" | a:active {color: blue ; text-decoration: none} | W3schools.com, a great CSS resource |
vlink="yellow" | a:visited {color: #CCFF99; background-color:#669900; border-style: solid; border-color: black; border-width:2px} | W3schools.com, a great CSS resource |
n/a | a:hover {color:green; background-color: #FFCC00} | W3schools.com, a great CSS resource |