:nth-of-type() pseudo-classes
Widely available since 2018-01-29
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
- Chrome 4 Released on 2010-01-25
- Chrome Android 18 Released on 2012-06-27
- Edge 12 Released on 2015-07-29
- Firefox 3.5 Released on 2009-06-30
- Firefox for Android 4 Released on 2011-03-29
- Safari 3.1 Released on 2008-03-18
- Safari on iOS 2 Released on 2008-07-11