Cascading Order

2. Sort by specificity of selector: more specific selectors override more general ones. To rate a selector's specificity, count and combine (see the CSS1 spec) these values:
  1. number of ID attributes
  2. number of CLASS attributes
  3. number of tag names