css · level 1 · unit 3 · lesson 3
- meet it
- guess first
- your turn
- fix it
- 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.
guess first
A heading made lighter. Where does it go?
Guess before you run it. Wrong guesses are how you learn, and nothing is marked.
<h1>Quiet please</h1> h1 {
font-weight: normal;
text-align: right;
}
your turn
Your turn. Set up the lemonade stand.
Put the title in the middle and make the price bold, or even heavier. Fill in both blanks, then press run.
the page you’re styling
<h1>Lemonade stand</h1>
<p>50p a cup</p>your css
Press show my page to see it here.
- the title is in the middlenot checked yet
- the price is boldnot checked yet
fix it
The heading will not move to the middle. Fix it!
the page you’re styling
<h1>Welcome to the zoo</h1>your css
Press show my page to see it here.
- the heading is in the middlenot checked yet
- The heading did not move. Check the spelling of the value.
- CSS uses American spelling, the same as it does for
color. - Change
centretocenter, then press run.
nailed it
you made words bold and lined them up. :D
font-weight: boldmakes letters thick;normalmakes them regular.text-aligntakesleft,centerorright.- CSS spells it
center, nevercentre.
new words in your collection
- weight
- align
This lesson isn’t saved. A free account remembers every lesson you finish.