Comprehensive guide to modern HTML and CSS development.
CSS selectors allow you to target specific HTML elements to style them.
p { color: red; }).button { background: blue; })#header { height: 100px; })If there are two or more conflicting CSS rules that point to the same element, the browser follows rules of specificity to determine which one wins.
Hierarchy (from lowest to highest power): Element < Class < ID < Inline Style < !important.
Edit the code below and click Run to see the result live.