In CSS, a pseudo-class selector targets elements depending on their state rather than on information from the document tree. For example, the selector a:visited applies styles only to links that the user has already followed.
A CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s). For example, :hover can be used to change a button's color when the user's pointer hovers over it.
/* Any button over which the user's pointer is hovering */
button:hover {
color: blue;
}