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