The :visited pseudo-class applies to links the user has visited
User agents commonly display unvisited links differently from previously visited ones. Selectors provides pseudo-classes to distinguish them:
:link
pseudo-class applies to links that have not yet been visited.:visited
pseudo-class applies once the link has been visited by the user.After some amount of time, user agents may choose to return a visited link to the (unvisited) ‘:link
’ state.
The two states are mutually exclusive.
ExamplesThe following style rule uses :visited to set the color attribute of visited links in a document.
a:visited { color:blue }
Usage
:visited is often used with :active, :hover, and :link, which are the pseudo-classes that reflect the other states of a link.
The default value of the :visited pseudo-class varies by browser, as does the amount of time used to define a recent visit.
NotesThe pseudo-classes :link and :visited can be abused to determine which sites a user has visited.
To preserver their users’ privacy, browsers often implement counter-measures against these abuses, while still rendering visited and unvisited links differently.
Related specificationsMicrosoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4