CSS pseudo class :visited – style for visited links

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;
<a href="#link1">link1</a> 
<a href="#link2">link2</a>



Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments