Web features explorer

:nth-of-type() pseudo-classes

Widely available since 2018-01-29
Tags: css Groups: CSS > Selectors

The :nth-of-type() and :nth-last-of-type() CSS functional pseudo-classes match elements based on their position among siblings of the same type. The :first-of-type, :last-of-type, and :only-of-type` pseudo-classes match the first, last, and only elements of its type.

Learning resources on MDN

Browser support