You have already learned how to style <a> or link elements in Lesson 3, "Selectors in Action." Now you will learn how to style the five different link states. Links can be in the following states:
Some link states cannot occur at the same time. For example, a link can either be visited or unvisitedit cannot be both. However, visited and unvisited links can also be in the hover, active, and focus states. Each of these states can be styled individually using link pseudo-classes (classes that do not exist in the document structure). The five link pseudo-classes are
The five pseudo-classes are shown in Listing 10.1. Listing 10.1. CSS Code Containing the Five Link Pseudo-Classesa:link {...} a:visited {...} a:focus {...} a:hover {...} a:active {...}
|