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

7.1. anchor Pseudo-Element

The anchor pseudo-element controls how links are handled on a Web page. Many browsers display a link differently depending on whether or not it has already been visited, or is actively being clicked on by the user. The anchor pseudo-element is actually a set of sub-properties that give the Web author full control over how links appear on a Web page.

The anchor pseudo-element is comprised of the following sub-properties: a:link, a:active and a:visited. a:link defines how an unclicked and unvisited link (in other words, a link “at rest”) should appear on a Web page. The a:active property defines how a link should appear when it is clicked or otherwise selected by the user. The a:visited property determines what the link should look like after it has been visited. These CSS pseudo-properties are designed to work in exactly the same way as the anchor attributes you can add to the <body> tag using HTML, as the following line of code shows:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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