# Specifity

# Specifity-Rules

Rule1: From top to bottom

styles that appear later in the style sheet overwrite the ones that appeared earlier

Rule 2: IDs over Classes over Tags over Universal

Rule 3: Inline CSS over Internal CSS over External CSS

Rule 4: !important trumps everything (To be used wisely and only in exceptional cases!!)

.highlighted {
  background-color: yellow !important;
}

composit selector usually has higher specificity


# Cascading & Inheritance