Our first style

By default, our web pages are black and white with a serif font and no white space between them and the edge of the page. Let's add some style to change that and try to understand the code.

info

You can edit this code! Try changing the CSS and HTML and see what happens.

If you read the CSS code above, you might notice that there are pairs of properties and values -- background-color: pink for example. These CSS declarations make up how we style elements. There are hundreds of properties we can choose from, but we'll focus on a few in this section.

The entire section of CSS code above is called a CSS ruleset. A ruleset combines a selector (in the code above, body) with one or more declarations. We'll learn more about selectors next.