How to style link

I will explain you how to style text link with the help of example. For this I have created one link and declare link Css properties. The default link is red and after cursor over the link text, the link will appear blue.

link, visited, hover, and active these are four selectors.

< style type="text/css">
a:link {color:# c70505; }
a:visited {color:# 0caa0c; }
a:hover {color:# 406ee2; }
a:active {color:#ccccc; }
< /style>


In the above code link(a:link) defines the properties for an unvisited link. VISITED (a:visited) defines the properties for a visitied link. ACTIVE(a:active) defines the properties of a currently active link. HOVER (a:hover)defines the properties when a mouse is over a link which is blue here.

You can specify a different BACKGROUND color, cursors, font …etc for link

0 comments: