priority | selector | example |
---|---|---|
1 | inline style in html tag | <div style="color:red" > |
2 | tag#id | div#myID { color:red; } |
3 | #id | .myID { color:red; } |
4 | tag.class | div.myClass { color:red; } |
5 | .class | .myClass { color:red; } |
6 | tag | div { color:red; } |
7 | * | * { color:red; } |
Reference: