CSS Links

CSS Links:

links can be styled differently depending on what state they are in.
The four links states are:
• a:link – a normal, link is not visited
• a:visited – the user has visited the link
• a:hover – a link when the user move mouse pointer over it
• a:active – a link the moment it is clicked

Example
<!DOCTYPE html>
<html>
<head>
<style>
/* link is not visited */
a:link {
color: red;
}

/* link after visit */
a:visited {
color: green;
}

/* move mouse pointer over link */
a:hover {
color: hotpink;
}

/* selected link */
a:active {
color: blue;
}
</style>
</head>
<body>

<p><b><a href=”default.asp” target=”_blank”>This is a link</a></b></p>

</body>
</html>

 

Leave a Reply

Your email address will not be published. Required fields are marked *