put a css to all of 1st and 4th firth child code example Example: nth of type for every 4th after the 1st :nth-of-type(4n+1)