×

css · level 1 · unit 4 · lesson 1

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

Style body once and everything inside takes after it.

<body> is the element that holds everything you can see. The browser adds one round every page in this course, even when you cannot see its tags.

Many text styles : an element takes them from its , the element it sits inside. Set font-family or color on body and every heading and paragraph follows. An element's own rule beats what it inherits.

To give several tags the same style, list them with commas: h1, h2. That is a . One rule, many targets.

<h1>Pond life</h1>
<h2>Frogs</h2>
<p>Frogs can jump twenty times their own length.</p>
body {
  font-family: Verdana, sans-serif;
  color: darkgreen;
}
h1, h2 {
  color: navy;
}

Press show my page to see it here.

<h2> is a smaller heading, one step down from <h1>.