Hyperlinks

From: http://www.w3schools.com/css/css_examples.asp

Add different colors to a hyperlink

<html>
   <head>
<style type="text/css">
   a:link {color: #FF0000}
   a:visited {color: #00FF00}
   a:hover {color: #FF00FF}
   a:active {color: #0000FF}
   </style>
</head>
<body>
<p><b><a href="default.asp" target="_blank">This is a link</a></b></p>
   <p><b>Note:</b> a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective!!</p>
   <p><b>Note:</b> a:active MUST come after a:hover in the CSS definition in order to be effective!!</p>
</body>
   </html>
 

Add other styles to hyperlinks

<html>
   <head>
   <style type="text/css">
   a.one:link {color: #ff0000}
   a.one:visited {color: #0000ff}
   a.one:hover {color: #ffcc00}
a.two:link {color: #ff0000}
   a.two:visited {color: #0000ff}
   a.two:hover {font-size: 150%}
a.three:link {color: #ff0000}
   a.three:visited {color: #0000ff}
   a.three:hover {background: #66ff66}
a.four:link {color: #ff0000}
   a.four:visited {color: #0000ff}
   a.four:hover {font-family: fixedsys}
a.five:link {color: #ff0000; text-decoration: none}
   a.five:visited {color: #0000ff; text-decoration: none}
   a.five:hover {text-decoration: underline}
   </style>
   </head>
<body>
   <p>Mouse over the links to see them change layout.</p>
<p><b><a class="one" href="default.asp"    target="_blank">This link changes color</a></b></p>
   <p><b><a class="two" href="default.asp" target="_blank">This    link changes font-size</a></b></p>
   <p><b><a class="three" href="default.asp"    target="_blank">This link changes background-color</a></b></p>
   <p><b><a class="four" href="default.asp"    target="_blank">This link changes font-family</a></b></p>
   <p><b><a class="five" href="default.asp"    target="_blank">This link changes text-decoration</a></b></p>
   </body>
</html>

Make the first letter special in a text

<html>
   <head>
<style type="text/css">
div:first-letter 
   {
   color: #ff0000;
   font-size:xx-large
   }
   </style>
</head>
<body>
<p><b>Note:</b> Netscape 4 does not support the "first-letter"    property.</p>
   <p><b>Note:</b> Internet Explorer 5.5 supports the "first-letter"    property.</p>
<div>
   You can use the first-letter pseudo-element to add special style to the first    letter of a text.
   </div>
</body>
   </html>

 

Make the first line special in a text

<html>
   <head>
<style type="text/css">
div:first-line 
   {
   color: #ff0000;
   font-variant: small-caps
   }
   </style>
</head>
<body>
<p><b>Note:</b> Netscape 4 does not support the "first-line"    property.</p>
   <p><b>Note:</b> Internet Explorer 5.5 supports the "first-line"    property.</p>
<div>
   You can use the first-line pseudo-element to add special style to the first    line of a text.
   </div>
</body>
   </html>