HTML Changing the color of links Code For Website - Learn About Website | DaddyFile

0

HTML Links - Colors Explain

When you move the mouse over a link, two things will normally happen:
  • The mouse arrow will turn into a little hand
  • The color of the link element will change
By default, a link will appear like this (in all browsers):
  • An unvisited link is underlined and blue
  • A visited link is underlined and purple
  • An active link is underlined and red
You can change the default colors, by using styles:



Html Code:

<!DOCTYPE html>
<html>
<head>
<style>
a:link {
    color: green;
    background-color: transparent;
    text-decoration: none;
}
a:visited {
    color: pink;
    background-color: transparent;
    text-decoration: none;
}
a:hover {
    color: red;
    background-color: transparent;
    text-decoration: underline;
}
a:active {
    color: yellow;
    background-color: transparent;
    text-decoration: underline;
}
</style>
</head>
<body>

<p>You can change the default colors of links</p>

<a href="http://www.Daddyfile.com" target="_blank">Our Site</a>

</body>
</html>




Html Code Result:

You can change the default colors of links
Our Site

Note: if This Code Not Properly Work So You Dont Worry.
You Can Copy This Code And Use Notepad And Then See Result.

Post a Comment

 
Top