CSS Pseudo Classes

  • link – this is a link that has not been used, nor is a mouse pointer hovering over it
  • visited – this is a link that has been used before, but has no mouse on it
  • hover – this is a link currently has a mouse pointer hovering over it/on it
  • active – this is a link that is in the process of being clicked

Example:

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

Note: The states must be defined in the correct order

  1. Leave a comment

Leave a comment

Design a site like this with WordPress.com
Get started