×

css · level 1 · unit 3 · lesson 3

  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

Make text bold and line it up.

font-weight sets the of the letters: how thick they are. bold makes them heavy and normal makes them regular. Headings start bold, so normal makes a heading lighter.

You can also use numbers from 100, very thin, to 900, very heavy. 400 is the same as normal and 700 is the same as bold.

text-align lines text up along the left, the right or down the center. CSS spells it the American way, center, the same as it does with color.

<h1>Menu</h1>
<p>Soup of the day</p>
h1 {
  text-align: center;
}
p {
  font-weight: bold;
  text-align: center;
}

Press show my page to see it here.

Swap center for right and run it again to see the text move.