Order

order is important

if you change one of the selectors to have a different specificity than the others, this will break down and you may get unexpected results.

a:link { color: blue; text-decoration: none; }

a:visited { color: purple; }

/* if user hovers over visited link, hover styles take precedence */
a:hover { text-decoration: underline; }

/* if user clicks link, active styles take precedence */
a:active { color: red; }

Last updated