Problem Statement
Which has higher specificity?
Explanation
An ID selector has higher specificity than class or element selectors. The priority order in CSS is inline styles, then IDs, then classes, then elements.
Code Solution
SolutionRead Only
#box { color: red; } /* overrides */
.box { color: blue; }Practice Sets
This question appears in the following practice sets:
