HTML – CSS Pseudo-classes

When working with link psuedo-classes remember to put them in the correct order.

Repeat after me. Link, visited, hover, active. Link, visited… Now repeat ten times.

The penalty for not putting your pseudo-classes in this order is that Firefox won’t highlight your links correctly.

a:link {color:#FF0000;}
a:visited {color:#00FF00;}
a:hover {color:#FF00FF;}
a:active {color:#0000FF;}

Other useful coding examples

a.red:visited {color:#FF0000;} /* a with a class */
p > i:first-child {} /* first italic child */