css
12 minLearning in PidginColours and Fonts
Give Ada's page colour and choose fonts wey people fit read well.
What you'll learn
- Use CSS to set colours
- Change font family and size
- Style HTML with selectors
Before you start
- html-basics
Ada's page dey work, but e dey look plain. Na CSS go do di makeover. CSS dey stand for Cascading Style Sheets — e dey control how your page look.
How CSS dey work
CSS use a selector to choose which element to style, and a property: value pair to set di style. Like this:
h1 {
color: red;
}
Dis one go make all h1 red. For colour, you fit use names like red, blue, or codes like #ec5252.
Fonts
font-family dey set di style of di text, and font-size dey set how big e be. Ada choose a friendly font and make her headings big so customers fit read her menu well.
Try it yourself
Colour and font
Open in playground →css
h1 {
color: #ec5252;
font-family: Arial, sans-serif;
font-size: 40px;
}Quiz
Small check
Answer di questions below.
1. Which property dey change di colour of text?
2. Which property dey change background colour?
