• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Colors > Setting the Color of Hyperlinks

Setting the Color of Hyperlinks

Until CSS, the most common use of color in Web browsers (other than in images) was to draw attention to hyperlinks. Some browsers use two colors: one for links that the user has traversed before and another for links that he hasn’t tried yet. Others use a third color for an “active” link; that is, for the short duration while the user keeps the mouse button pressed over the text. In CSS, rules for these can be written through a pseudo-class on an A element, as follows:

A:link { color: blue }      /* unvisited links */
A:visited { color: red }    /* visited links */
A:active { color: yellow }  /* active links */


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint