CSS Links
We can set different properties of a hyperlink using CSS.
- :link indicates unvisited hyperlinks.
- :visited indicates visited hyperlinks.
- :hover activates when the element has the user's mouse pointer over it.
- :active indicates the element on which the user is currently clicking.
background-color
The background-color property defines the background color of an element.
Eg:
<style>
a:link
{
color: #03C;
}
a:visited
{
color: #FF3;
}
a:hover
{
color: #F90;
cursor:pointer;
}
a:active
{
color: #336633;
}
<a>Background Properties</a>