Specificity
Rules which are more specific will take precedence over less specific rules. This is true even if the less specific rule is defined last.
For example;
h1 p {}is more specific thanp {}alone..box-twois more specific than<div>.#first-paragraph-idis more specific than.box-two