1
HTML/CSSIntermediate#css#selectors
nth-child(n) selects elements based on their position among siblings, accepting keywords (odd/even) or formulas (an+b). It counts ALL sibling elements matching the selector regardless of type, unlike nth-of-type which only counts same-type siblings.
li:nth-child(2n) { background: #eee; } /* even rows */
li:nth-child(3n+1) { color: blue; } /* 1st, 4th, 7th... */
p:nth-of-type(1) { font-weight: bold; } /* first <p> among siblings */