Your site says the right things. Today you decide how it looks: its colours, its font, the size of its text.
And today is the day you stop only reading the code and start writing it.
Getting started: open the builder below and carry on with your site.
Everything you have written so far says what things are: a heading, a paragraph, a picture. None of it says what they should look like. That is a separate job, and it has its own language: CSS.
A CSS rule has three parts worth naming, because you will use these words all lesson:
So this rule says: for the whole page, make the background pale blue.
body {
background: lightblue;
color: navy;
font-family: sans-serif;
}
Before you change anything, find your page in the CSS.
Right now that top rule looks exactly like this, because nobody has changed anything yet:
body {
background: white;
color: black;
font-family: sans-serif;
margin: 16px;
}Now change it, keeping one eye on that top rule.
Before you go on: point at the top rule and say which property you changed: background, color, or font-family.
This is the block those three dropdowns live on:
{"blocks": {"languageVersion": 0, "blocks": [{"type": "web_page", "fields": {"NAME": "Home", "BG": "white", "FG": "black", "FONT": "sans-serif"}, "inputs": {"CONTENT": {"block": {"type": "wp_heading", "fields": {"TEXT": "My page", "ALIGN": "left"}}}}, "x": 10, "y": 10}]}}
Now a style that belongs to one kind of thing rather than the whole page.
Here is the block you changed, and the rule it wrote. The dot at the front means “anything labelled big”:
{"blocks": {"languageVersion": 0, "blocks": [{"type": "wp_text", "fields": {"TEXT": "This is the first thing I want people to read.", "SIZE": "big", "ALIGN": "left"}, "x": 10, "y": 10}]}}
.big {
font-size: 1.5rem;
}You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.