tutorialstonight logo
A Platform To Learn To Code

CSS LINKS



CSS let us style hyper link.Hyper links can be styled with the following specifications which shows their state:

  1. a:link This specify a normal unvisited link
  2. a:visited This specify a visited link
  3. a:hover This specify a state of link when mouse pointer is over the link
  4. a:active This specify an active link


1.) a:link (Normal link)

a:link represents the normal state of any link when no activity has been done over the link.

we can set color,font,style,background-color or any style on a normal link using CSS.

Example

Run the code

2.) a:visited

The a:visited specify the state of link when link is visited (when link is clicked at least once).

To show the link is visited generally the color of the link is changed.

Example

Run the code

3.) a:hover (mouse over)

The a:hover specifies a state of link when mouse pointer is over it.

Hyperlink can be made to change behaviour when the mouse pointer is over it.

Example

Run the code

4.) a:active (just clicked)

The a:active specifies the state of link when link is active (when mouse is just clicked).

To show the link is active generally the color of the link is changed.

Example

Run the code


BOX

BOX