HOME
          About US
          Contact Us

CSS Link Text

Chapter - 21 : CSS Links Text


This is used to give special effect to 'link text'. A links can be displayed in following ways.

a) Unvisited link : A link which is still not visited
It is defined as a:link
b) Visited link : This link is visited at least once.
It is defined as a:visited
c) Mouse Over link : At present the curser in on this link.
It is defined as a:hover
d) Selected link : At present this link is active.
It is defined as a:active

It is not necessary to define all the four values, but if it is defined then they should in same sequence as shown above.

Link - visited - hover - active


i) Link Color: The link color can be defined in Name (red etc.) or in Hex code (CSS Link Textff0000)

Command:
a:link {color:red;}
a:visited {color:green;}
a:hover {color:yellow;}
a:active {color:white;}

The link color of the web page will automatically change as defined above and you will appreciate that, visitor can easily differentiate between the various statuses of Link.

ii) Link Background Color: Same as link color, background color can also be defined in Name (red etc.) or in Hex code (CSS Link Textff0000 etc.). This color will be visible only in the background of Link Text.

a:link {background-color:blue;}
a:visited {background-color:blue;}
a:hover {background-color:red;}
a:active {background-color:black;}

iii) Link Text Decoration: This property is mainly used to remove underlines from links. It has got only 2 values and it can be defined for all 4 types of link property (i.e. link, visited, hover, active)

text-decoration:none;
text-decoration:underline;

CSS Link Text © funandhobby.com (CSS Link Text)