![]() |
An HTML link is displayed in a different color depending on whether it has been visited, is unvisited, or is active. By default, a link will appear like this (in all browsers):
You can change the link state colors, by using CSS: |
Example:
HTML
<!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>
<h2>Link Colors</h2>
<p>You can change the default colors of links</p>
<a href="html_images.asp" target="_blank">HTML Images</a>
</body>
</html>
What is HTML Links Color | HTML Links Color |
How to create Link Buttons | HTML Links Color |
Full Example HTML Links Color | HTML Links Color |
Read Full: | HTML Links Color |
Category: | Web Tutorial |
Sub Category: | HTML Links Color |
Uploaded by: | Admin |
Views: | 131 |
Reffered: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_links_colors