CSS/Selectors/pseudo-classes/:link

From W3C Wiki
< CSS‎ | Selectors

Pseudo-classes :link

The :link pseudo-class applies to links that have not yet been visited.

Syntax

selector:link{ properties }


Example

[style.css]

 a:link{
   color: red;
 }
 a:visited{
   color: green;
 }


[index.html]

<body>
  <p><a href="http://www.w3.org/">W3C</a> is an international community</p>
</body>

CSS defines the :link pseudo-class in 6.6.1. Dynamic pseudo-classes.