# :nth-child()

Selects children by position, like odd rows or every third item.

## What does `:nth-child()` do?

`:nth-child()` picks children by position: a number, `odd`, `even`, or a pattern like `3n` for every third one.

```css
tr:nth-child(even) { background: #f5f5f5; }   /* striped table rows */
```

Level: Apprentice · [More CSS terms at this level](https://www.ask-codey.com/glossary/subjects/css/apprentice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/nth-child
