:nth-of-type pseudo-class
Applies one or more styles to the element that is the n-th sibling of its type.
![]() ![]() |
Syntax
selector:nth-of-type(an+b) {...}
Parameters
- selector
-
A CSS simple selector.
- an+b
Standards information
- Selectors Level 3, Section 6.6.5.4
Remarks
The :nth-of-type pseudo-class is a structural pseudo-class. Structural pseudo-classes enable selection based on extra information in the document tree that can't be selected using simple selectors or combinators.
See also
- Reference
- :root
- :nth-child
- :nth-last-child
- :nth-last-of-type
- :last-child
- :first-of-type
- :last-of-type
- :only-child
- :only-of-type
- :empty
Show:

