Designing of style property of links by using CSSNote that we have used internal style sheet here to assign style to the element, but it can be any external or inline style also. While declaring the property and value of different styles for a link we have to use a particular order. Here is the order that is to be fallowed while assigning styles for the links. A: link {} A: Visitied {} A: Hover {} A: Active {} This order is to be followed always. Now we will try to assign some property and value to this and use the style inside our head tag ( internal style sheet ) Here is the link which follows the style property set by us in internal style sheet. this is a link Now here the complete code with internal style sheet and the above demo link code for your easy understanding. Note how the internal style sheet is used and link displays that. <html> <head> <title>(Type a title for your page here)</title> <style type="text/css"> <!-- a:link {color: red; text-decoration: none; } a:visited {color: #0000CC; text-decoration: none; } a:hover {color: orange; text-decoration: underline; } a:active {color: blue; } --> </style> </head> <body > <a href=site_map.php >this is a link</a> </body> </html> Now with this understanding let us move to next step on creating attractive hover links using CSS where the link background color and font color will change when mouse moves over them.
This article is written by plus2net.com team.
|