Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

CSS Dictionary

  1. Home
  2. CSS Dictionary
  3. [CSS Selector] E:visited

[CSS Selector] E:visited

Using 'selector:visited' applies styles to elements whose link destination has been visited. Since it targets elements that have a link destination, it is mainly used on 'a' elements. This is generally called a 'pseudo-class' (the :visited pseudo-class).

Note that it may be overridden by other pseudo-classes, so pay attention to the order in which you write them. Writing them in the order ':link', ':visited', ':hover', ':active' (the 'LVHA' order) will prevent conflicts.

In particular, ':visited' must be written after ':link'.

Sample Code

a:link { color: red;}
a:visited { color: orange;} /* When separating styles for unvisited and visited links, always write ':visited' after ':link' as shown here. */

Browser Display Result

※ To try the sample below, please clear your browser history first.

a:visited { color: red;} /* Sets the text color of visited links to red. */

<p><a target="_top" href="https://www.google.co.jp/">Goes to Google. After visiting and returning, the color will change.</a></p>

Browser Compatibility

Chrome Chrome
1+
Firefox Firefox
1+
Safari Safari
1+
Edge Edge
12+
Supported in all versions
IE IE
11
10
9
8
7
6
Opera Opera
3.5+
2 and earlier ×
iOS Safari iOS Safari
1+
Android Android Browser
4.4+
3 and earlier ×
Chrome Android Chrome Android
Latest
Same support as desktop
Firefox Android Firefox Android
Latest
Same support as desktop

※ Version data is based on MDN.

If you find any errors or copyright issues, please .