Menu Home

nth-of-type

osbo.com | CSS | Pseudo-Classes | nth-of-type

The nth-of-type CSS pseudo-class represents the same elements that would be matched by :nth-child(|An+B| of S), where S is a type selector and namespace prefix matching the element in question.

Syntax

selector:nth-of-type(An+B) {
    property: value;
}

Examples

An+B

even

odd

Internal

first-child

first-of-type

last-child

last-of-type

nth-child

nth-last-child

nth-last-of-type

only-child

only-of-type

External

World Wide Web Consortium (W3C)