how to use hover in css

  
a:hover{ 
	background-color: yellow;
}
  
 .a:hover{background-color: black;}/* Changes an element's color on hover */

.selector {
	background-color: black;
}

.selector:hover {
	background-color: blue;
}  
    /* unvisited link */
a:link {
  color: green;
}

 
/* visited link */

 a:visited {
  color: green;
}

/* mouse over link */

 a:hover {
  color: red;
}

/* selected link */

 a:active {
  color: yellow;
}