:nth-child() Visualizer
Selectors:nth-child() selects elements by position. No extra classes needed. The formula An+B describes every repeating pattern: alternating rows, every third item, the first N, the last N.
nth-child browser support
Widely availableSince 202393% of people can use this
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2023.
Safe to use without fallbacks.