When rules disagree
One rule says paragraphs are grey, another says notes are red. Which wins? The cascade decides, mostly by specificity — how precise each selector is — and then by order.
Selectors
- Specificity, lowest to highest: type (p) < class (.note) < id (#intro) < inline style="".
- Equal specificity? The later rule wins.
- Some properties like color and font are inherited by children; others like padding aren't.
- Prefer classes for styling. ids and !important make CSS hard to override later.