State of links in CSS - HTML

Q.  Which of the following is / are the state of the links in CSS?
- Published on 19 Oct 15

a. a:link
b. a:visited
c. a:hover
d. a:active
e. All of the above.

ANSWER: All of the above.
 

    Discussion

  • Nirja Shah   -Posted on 05 Nov 15
    - Any CSS property can be used to style links (e.g. colour, font-family, background, etc.).

    - Links can be styled differently depending on what state they are in.

    - There are four links states:

    1. a:link - a normal, unvisited link

    2. a:visited - a link the user has visited

    3. a:hover - a link when the user mouses over it

    4. a:active - a link the moment it is clicked

    - Some order rules are followed while setting the style for several link states:

    1. a:hover MUST come after a:link and a:visited
    2. a:active MUST come after a:hover

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)