By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

The CSS Visited Selector

The Visited Pseudo-class is used to select visited links on a page.

Created: 2012-10-07 06:02

The :visited selector applies to visited links on a page. It is usually used in combination with :link and :hover to change the appearance of different link states.

Changing the color of visited links can be important for usability reasons, but it can also improve the appearance of a page design. :visited can be used when there is poor contrast between links on a page, and/or when there are many links, or solely for design purposes.

Changing Styles for Visited Links

To change the appearance of visited links – in the below example the color is changed:

a:visited { color: purple; }

Remember the recommended order is as follows:

a:link {}
a:visited {}
a:hover {}
a:active {}