Anatomy of a Rule ๐
Before you write any CSS, let's read one slowly. Every CSS rule has the same four parts, every single time:
h1 { color: blue; }
Let's name them:
h1is the selector โ which elements to style (here, every<h1>).coloris the property โ what you want to change (the text color).blueis the value โ how you want it (blue!).- The
{ }curly braces hold the property and value together, and the:and;are the punctuation:property: value;.
Read it out loud like a sentence: "For every h1, set the color to blue." ๐ฃ๏ธ
Once you can spot these four parts, you can read any CSS rule. Try it below. ๐