css how to select nth child of div with class name code example Example: select first 5 child css li:nth-child(-n+5) { color: green; }