Sets the style of an A element when the link has been visited recently.
Syntax
[a]:visited {sRules}
Possible values
sRules
String that specifies one or more cascading style sheet attribute/value pairs.
Remarks
The default value of the :visited pseudo-class is browser-specific. The time period used to define a recent visit also varies by browser.
The :visited pseudo-class is most often used with :active, :hover and, :link, the pseudo-classes that affect the other states of a link.
Example
The following style rule uses the :visited pseudo-class to set the color property of visited links in a document:
![]() | |
---|---|
<style> a:visited {color:blue} </style> |
Standards information
This pseudo-class is defined in Cascading Style Sheets (CSS), Level 1 (CSS1).
Applies to
A