CSS Nth Child Examples
Updated Mar 14, 2026
CSS :nth-child() is a powerful pseudo-class selector that lets developers target elements based on their position within a parent. Using pure CSS, you can style odd and even items, select patterns, highlight specific elements, and create dynamic layouts without adding extra classes.
:nth-child 2
Demo & Code:nth-child Flower
Demo & CodeAlphabet
Demo & CodeCSS Pattern Using :nth Selector
Demo & Code
loading