×

css · level 1 · unit 3 · 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

font-size makes text bigger or smaller.

The style of the letters is called the . font-size sets how big the letters are. The value is a number with a after it, like 24px, with no space between them.

px is short for , one of the tiny dots of light that make up your screen. Ordinary text is 16px. An <h1> starts at 32px, which is why headings look big.

Make the important things big and the small print small. Around 12px is the smallest most people can read in comfort.

<h1>Big news</h1>
<p>The cat learned to open the fridge.</p>
h1 {
  font-size: 48px;
}
p {
  font-size: 20px;
}

Press show my page to see it here.

Try 100px on the heading to see how far it goes.