CSS :visited pseudo-class applies once the link has been visited by the user
Example – use :visited to apply style to visited links
This example displays visited links in orange color. Clicking on a link makes it visited and style applied by :visited is applied. Note that you will have to clear your browser cache to make this example work second time.
<p>Clicking on these links (if unvisited) will apply :visited style on these</p> <style type="text/css"> a:visited { color: orange; } </style> <a href="#link1">link1</a> <a href="#link2">link2</a>
Related
- CSS pseudo class :link - style for unvisited links
- CSS pseudo class :hover
- CSS pseudo class :active
- CSS pseudo class :focus