# :nth-child()

*noun*

say it: **“KOH-lun ENTH CHYLD”** **/ˈkoʊlən ɛnθ tʃaɪld/** or **“ENTH CHYLD”** **/ɛnθ tʃaɪld/**

A pseudo-class that picks elements by their position among their siblings: :nth-child(odd) for every other one, :nth-child(3) for the third, :nth-child(3n) for every third.

## 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 */
```

## In a sentence

- “With **:nth-child()** and the word odd in its parentheses, every other row of the high-score table turned light gray.”

Level: Apprentice · [More CSS terms at this level](https://www.ask-codey.com/glossary?category=css&level=2)

Updated: November 9, 2026

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