:nth-child() Visualizer
: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.
Select a pattern
Try your own:
Live preview
Generated CSS
CSS selector
:nth-child() Browser Support
Widely available
Since
2023 93% global usage
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.
111+
113+
9+
111+