Explore Library
Quiz

Specificity vs Source Order Cascade

Determine which rule wins when specificity and source order conflict across an element with an ID and classes.

Given <button id="save" class="btn primary">, and these rules in a single stylesheet loaded in this order: 1) #save { color: red } 2) .btn.primary { color: blue } 3) button.primary { color: green } Which color applies, and why?