CSS Link Color

You are currently viewing CSS Link Color

CSS link color properties are used to add the color of the link (hyperlink). CSS Link color means hyperlink styling. CSS link color is used to add the color and another styling of the <a> tag is used as showing in the following.

CSS Link Color

a {
  color: hotpink;
}

In addition, links can be styled differently depending on what state they are in

/* unvisited link */
a:link {
  color: red;
}

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

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

/* selected link */
a:active {
  color: blue;
}

The following four style sheet entities are used to control hyperlinks in CSS

a:link{}
a:visited{}
a:active{}
a:hover{}
  • a: link
    • is used to specify the attributes of a hyperlink
a:link{
   color:blue; 
   text-decoration: none;
}
  • a: visited
    • is used to specify the attributes of the hyperlinks that have been visited
a:visited{
   color:red; 
   text-decoration: none;
}
  • a:active
    • is used to specify the attributes of the active hyperlinks
a:active{
   color:green; 
   text-decoration:none;
}
  • a: hover
    • is used to specify attributes of the hyperlinks on which the user is moving the mouse.
a:hover{
   color:magenta; 
   text-decoration: none;
}

Reference

If you want to learn more about CSS visit the official website: Visit

CSS Link Color

Visit the CSS tutorial list. And make strong your CSS concept. Click here. wuschools.com is always written about the CSS concept for the CSS lover. Ang writes about how CSS makes your life easy if you are a web site developer. We help you to continue your learning.

Leave a Reply