CSS is a declarative language: You declare that any elements which match a given CSS selector (the part before the curly braces) should apply the property values inside the rule (the part inside curly braces). But what happens when multiple selectors (and therefore multiple rules) apply to the same element? Or, how do you override styles for a particular element that you do not want? Why not just use !important
to make sure that what we want is being set?
The steps that CSS takes in deciding which properties are chosen are well-defined, if you want to read the CSS specification on cascading, which is how the rules from different stylesheet types get layered and applied, and its companion CSS specification on specificity, which is how a CSS selector is ranked in importance. Since you're not a browser vendor, it might be a bit easier to read on.
When we're developing a web page, which CSS rules override which other CSS rul