Tuesday, October 12, 2010

CSS Hyperlinks

You can use CSS to change the appearance and behavior of hyperlinks.Links can be styled in different ways.
Links can be style with any CSS property 

To do this, you can use the following selectors
  • a
  • a:link
  • a:visited
  • a:hover
  • a:active
above selectors represent the 'anchor' element.

 Examples
a {font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px}
a:link {color:red;}
a:visited {color: #660066;}
a:hover {text-decoration: none; color: #ff9900; font-weight:bold;}
a:active {color: #ff0000;text-decoration: none}

For result copy below code & try it on your browser

<head>
<style type="text/css">
a {font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px}
a:link {color:red;}
a:visited {color: #660066;}
a:hover {text-decoration: none; color: #ff9900; font-weight:bold;}
a:active {color: #ff0000;text-decoration: none}
</style>
</head>
<body>
<p><a href="http://www.w3schoolss.blogspot.com/">Hyperlinks</a></p>
</body>
 

 



No comments:

Post a Comment