VOOZH about

URL: https://www.geeksforgeeks.org/css/css-visited-selector/

⇱ CSS :visited Selector - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

CSS :visited Selector

Last Updated : 30 Aug, 2024

The :visited selector in CSS is used to select the visited links. For example, visit some link on the website and again see it, then it will find the changed color of that link. This color change is done by :visited the selector. 
The allowed CSS property of : visited selectors are listed below: 

  • color
  • border-color
  • background-color
  • outline color
  • column-rule-color
  • fill-color and stroke

Syntax:

:visited {
// CSS Properties
}

Example: In this example, The :visited selector is used to style visited links, applying green color to the visited link in this example.

Output:

👁 Image

Supported Browser:

  • Google Chrome 1
  • Microsoft Edge 12
  • Firefox 1
  • Opera 3.5
  • Safari 1
Comment
Article Tags: