CSS: Pseudo Class

By Xah Lee. Date: . Last updated: .

What is Pseudo-Class

CSS Pseudo-Class Selectors is a misc set of CSS Selector Syntax.

Their syntax all have the form

tagName:pseudoClassName

They match HTML/XML elements in some particular way, by criterion of nesting structure relationship with other elements, or user interface state, or other misc criterion.

Example:

/* pseudo-class CSS selectors, to color links */
a:link {
text-decoration:none;
}

a:visited {
text-decoration:none;
}

a:hover {
background-color:pink;
}

Complete List of Pseudo-Class

CSS, pseudo-element and pseudo-class