CSSCSS · Lesson 2 of 9
Selectors & Properties
Selectors target which HTML elements to style. The more specific the selector, the higher the specificity, and the more likely it is to win if there's a conflict.
CSS specificity determines which rule wins when multiple rules target the same element. ID selectors beat class selectors, which beat element selectors. When specificity is equal, the last rule in the stylesheet wins.