Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize
Information
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

 

Syntax

selector:visited {...}

Parameters

selector

A CSS simple selector.

Standards information

Remarks

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

Examples

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


<style>
    A:visited { color:blue } 
</style>

 

 

Show:
© 2015 Microsoft