Skip to main content
๐ŸŽจ CSS Basics

Predict the Color ๐Ÿ”ฎ

Good coders read code and picture the result in their head before running it. Let's practice with the rule you just learned.

Here's a tiny page:

<style>
  h1 { color: green; }
</style>
<h1>Hi there!</h1>

Read it like a sentence: "For every h1, set the color to green."

Picture the page in your mind, then answer below. ๐Ÿ‘‡

What color will the <h1> text be?

Now this rule:

p { color: purple; }

What color will the <p> text be?

Which rule would make a <p> orange?