Utilizor
Contact Us

CSS Pseudo-classes

A complete list of CSS pseudo-classes.

CSS Pseudo-Classes Reference

A pseudo-class is used to define a special state of an element.

Selector Example Description
:active a:active Selects the active link
:checked input:checked Selects every checked <input> element
:disabled input:disabled Selects every disabled <input> element
:empty p:empty Selects every <p> element that has no children
:first-child p:first-child Selects every <p> element that is the first child of its parent
:hover a:hover Selects links on mouse over

Example

/* Change link color on hover */
a:hover {
  color: red;
}