Pseudo-Class |
Applies To |
:active |
an activated element |
:focus |
an element while the element has focus |
:hover |
an element when you mouse over it |
:link |
an unvisited link |
:disabled |
an element while the element is disabled |
:enabled |
an element while the element is enabled |
:checked |
an element that is checked |
:selection |
an element that is currently selected or highlighted by the user |
:lang |
allows the author to specify a language to use in a specified element |
:nth-child(n) |
an element that is the n-th sibling |
:nth-last-child(n) |
an element that is the n-th sibling counting from the last sibling |
:first-child |
an element that is the first sibling |
:last-child |
an element that is the last sibling |
:only-child |
an element that is the only child |
:nth-of-type(n) |
an element that is the n-th sibling of its type counting from the last sibling |
:nth-last-of-type(n) |
an element that is the last sibling of its type |
:last-of-type |
an element that is the last sibling of its type |
:first-of-type |
an element that is the first sibling of its type |
:only-of-type |
an element that is the only child of its type |
:empty |
an element that has no children |
:root |
root element within the document |
:not(x) |
an element not represented by the argument ‘x’ |
:target |
a target element as specified by a target in a UR |