CSS :visited selector
Complete CSS Selector Reference Manual
Example
Select the style of visited links:
a:visited
{
background-color:yellow;
}
Try it »
Definition and Usage
:visited adds a special style to visited links.
Tip: Use the :visited selector to set the style of visited page links, :hoverThe selector styles links when the mouse hovers over them,:active The selector sets the style when you click a link.
Browser support
The numbers in the table indicate the first browser version that supports this property.
| Selector | |||||
|---|---|---|---|---|---|
| :visited | 4.0 | 7.0 | 2.0 | 3.1 | 9.6 |
Related Articles
CSS Tutorial: CSS links
CSS Tutorial: CSS pseudo-classes
More examples
Example
Active, visited, unvisited, or links with the mouse hovering over them:
a:link {color:green;}
a:visited {color:green;}
a:hover {color:red;}
a:active {color:yellow;}
Try it »
Example
Links with different styles:
a.ex1:hover,a.ex1:active {color:red;}
a.ex2:hover,a.ex2:active {font-size:150%;}
Try it »