select first 5 child css

CSS
li:nth-child(-n+5) {
    color: green;   
}
Source

Also in CSS: