SQL PHP HTML ASP JavaScript articles and free scripts to download
HTML CSS

Designing of style property of links by using CSS

By using CSS we can manage our links with highlighting or can add effect when mouse moves over the link ( hover ). We can also tell the visitor what are the links already visited by using visited property. Now we can set this property in our style and will also learn how to override them by declaring inline property for the element.

Note 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.

Be the first to post comment on this article :


Google+
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked



Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer