8.4 Pseudo Classes with CSS CLasses
Pseudo-classes can also be combined with regular CSS classes to add more styling possibilites to documents. The basic format is as follows:
selector.class:pseudo-class {property:value;}
For example, starting with the anchor tag again:
a.red:visited {color:#FF0000;}
And in the HTML document we could have:
<a class="red" href="page2.html">Page 2</a>
If the link in the example above has been visited, it will be displayed in red. This is a pretty simple example but I'm sure you can see the possibilities this gives in terms of adding effective styling to specific parts of your web pages.