medium10 pts · first answer countscssspecificity
Which CSS rule wins
A paragraph has id="intro" and class="note". All rules below are in the same stylesheet with no !important. Which color is applied?
#intro { color: red; }
p.note { color: blue; }
.note.note.note { color: green; }
p { color: black; }Discussion 0
Join free to post in the discussion.
Related questions
- Width with border-boxFrontend Developer
- Centering with FlexboxFrontend Developer
- What 1rem is relative toFrontend Developer
- Where absolute elements are placedFrontend Developer
- Hiding an element but keeping its spaceFrontend Developer
- Media query for mobile-first CSSFrontend Developer
- Which value a CSS variable takesFrontend Developer
- z-index that does not workFrontend Developer