CodeZettaInterview Hub

CSS · Selectors · Senior · Live Coding

What are structural pseudo-classes like nth-child useful for?

Short Interview Answer

Selecting by position without extra classes — zebra rows, first/last, formulas.

Detailed Explanation

nth-child counts all children; nth-of-type filters by type. Off-by-one common.

Did you know this answer?