link and visited Selector

link and visited Selector
CSS link and visited Selector reference
The CSS link selector ( X:link() { } ) and visited selector ( X:visited() { } ) are used to target and style link elements according to whether or not the user has visited the link destination already. Browser software will usually set visited links to a different color and these selectors allow you to specify styles for this logic.
CSS CODE EXAMPLE
<!DOCTYPE html>
<style type="text/css">
a:link {
    color:#900;
}
a:visited {
    color:#CCC;
}
</style>
<ul>
  <li><a href="#x">Home</a></li>
  <li><a href="#y">Services</a></li>
  <li><a href="#z">Contact</a></li>
</ul>
Demo Hint: To see the effect of this start clicking my links below. Each time you visit a destination the link will change appearance.
 

Related Posts :

  • empty-cells empty-cells CSS empty-cells Property The CSS empty-cells property is used to spe… Read More...
  • cursor cursor CSS cursor Property The CSS cursor property is used to change the cursor … Read More...
  • direction direction CSS direction Property The CSS direction property is used to specify t… Read More...
  • cue cue CSS cue Property The CSS cue-after , cue-before and cue … Read More...
  • elevation elevation CSS elevation Property The CSS elevation property is part of CSS aural… Read More...

0 Response to "link and visited Selector"

Post a Comment