Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

:visited pseudo-class

Specifies the style of an a element if the link has been visited recently.

CSS 2.1, Section 5.11.2



selector:visited {...}



A CSS simple selector.

Standards information


: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.

Windows Internet Explorer 8. For security reasons, :visited is not supported by querySelector or querySelectorAll; for more information, see Selecting Objects with JavaScript.


The following style rule uses :visited to set the color attribute of visited links in a document.

    A:visited { color:blue } 



© 2017 Microsoft