Q
Which declaration wins: an inline style="color: red", or a stylesheet rule #x { color: blue !important; }?
-
A
The !important rule (blue)
-
B
Neither; the browser default is used
-
C
Whichever comes later in the file
-
D
The inline style (red)
Correct Answer:
A. The !important rule (blue)
Explanation:
!important overrides normal declarations, including inline styles, unless the inline style is also !important.
ALSO KNOW (related points):
β’ What does 100vh mean? β 100% of the viewport's height