This link history pseudo-class selects only unvisited links. If it's needed to style only non-visited links, you need to set the :link
selector before the others.
# Syntax
Copy
:link {
/* declarations */
}
# Example
Copy
:link {
color: green;
}
In this example will the second link - which doesn't exists - be in green color.
Try example in CodePen# Browser support
Platform
Chrome
Firefox
Safari
Edge
Internet Explorer
Opera
Desktop
Yes (1.0)
Yes (1.0)
Yes (1.0)
Yes (12.0)
Yes (3.0)
Yes (3.0)
Mobile
Yes (1.5)
Yes (1.0)
Yes (3.1)
Yes (12.0)
Yes (3.0)
Yes (3.0)
Please wait a moment, the comments start loading now...