CSS Worksheet: Colour and Text Properties
Code tip (Letters, behind, size, place): color = colour of the letters; background-color = colour behind them. font-size = how big (e.g. 20px); font-weight: bold = thick letters; font-family = the font. text-align: left / center / right places the text on its line.
NameDateTime takenScore ___ / 40
-
1.🖌️ How big is the text, in px?
p {
text-align: left;
background-color: red;
color: black;
font-size: 24px;
} -
2.🖌️ What colour is behind the letters?
li {
background-color: red;
text-align: center;
color: purple;
font-size: 36px;
} (a) red (b) purple (c) black -
3.🖌️ Where does the text sit on its line?
p {
background-color: black;
font-size: 24px;
text-align: left;
color: yellow;
} (a) in the middle (b) on the left (c) on the right - 4.What does font-size do? (a) centres a heading (b) makes letters bigger (c) sets the letter colour (d) colours behind the text
- 5.What does font-weight do? (a) sets the letter colour (b) makes the text bold (c) colours behind the text (d) centres a heading
-
6.🖌️ What colour is behind the letters?
h1 {
font-size: 24px;
background-color: black;
color: red;
text-align: left;
} (a) red (b) white (c) black -
7.🖌️ Where does the text sit on its line?
p {
color: black;
font-size: 28px;
background-color: red;
text-align: right;
} (a) in the middle (b) on the right (c) on the left -
8.🖌️ Where does the text sit on its line?
p {
text-align: left;
background-color: red;
font-size: 40px;
color: orange;
} (a) in the middle (b) on the right (c) on the left -
9.🖌️ Where does the text sit on its line?
h1 {
color: purple;
font-size: 16px;
background-color: blue;
text-align: right;
} (a) on the right (b) in the middle (c) on the left - 10.🖌️ Which CSS property makes letters bigger? (a) text-align (b) font-family (c) font-size (d) font-weight
-
11.🖌️ Where does the text sit on its line?
h2 {
color: purple;
background-color: red;
text-align: left;
font-size: 16px;
} (a) in the middle (b) on the left (c) on the right - 12.What does color do? (a) makes letters bigger (b) makes the text bold (c) centres a heading (d) sets the letter colour
- 13.What does font-family do? (a) picks the font style (b) makes the text bold (c) makes letters bigger (d) centres a heading
-
14.🖌️ What colour is behind the letters?
h1 {
background-color: blue;
text-align: center;
font-size: 32px;
color: yellow;
} (a) orange (b) blue (c) yellow -
15.🖌️ Where does the text sit on its line?
h1 {
font-size: 12px;
background-color: purple;
text-align: center;
color: blue;
} (a) on the right (b) on the left (c) in the middle -
16.🖌️ What colour is behind the letters?
li {
text-align: left;
color: purple;
background-color: blue;
font-size: 12px;
} (a) blue (b) green (c) purple -
17.🖌️ How big is the text, in px?
h1 {
background-color: red;
font-size: 12px;
color: white;
text-align: center;
} -
18.🖌️ What colour are the letters?
p {
font-size: 36px;
text-align: center;
background-color: white;
color: black;
} (a) black (b) blue (c) white -
19.🖌️ What colour is behind the letters?
h2 {
text-align: right;
font-size: 24px;
color: purple;
background-color: orange;
} (a) orange (b) red (c) purple - 20.🖌️ Which CSS property picks the font style? (a) color (b) font-size (c) font-weight (d) font-family
-
21.🖌️ Where does the text sit on its line?
h1 {
font-size: 20px;
color: white;
background-color: green;
text-align: right;
} (a) on the right (b) in the middle (c) on the left -
22.🖌️ How big is the text, in px?
h1 {
text-align: right;
font-size: 40px;
color: orange;
background-color: black;
} -
23.🖌️ What colour are the letters?
h2 {
background-color: white;
text-align: center;
color: red;
font-size: 28px;
} (a) green (b) red (c) white -
24.🖌️ What colour is behind the letters?
li {
color: red;
background-color: green;
font-size: 24px;
text-align: center;
} (a) green (b) yellow (c) red -
25.🖌️ What colour is behind the letters?
li {
text-align: right;
color: white;
background-color: purple;
font-size: 36px;
} (a) white (b) purple (c) black -
26.🖌️ Where does the text sit on its line?
h2 {
color: green;
background-color: orange;
font-size: 28px;
text-align: right;
} (a) on the right (b) in the middle (c) on the left -
27.🖌️ What colour is behind the letters?
li {
color: black;
font-size: 36px;
text-align: center;
background-color: blue;
} (a) purple (b) blue (c) black -
28.🖌️ How big is the text, in px?
p {
text-align: left;
color: blue;
background-color: white;
font-size: 12px;
} -
29.🖌️ What colour are the letters?
li {
color: yellow;
background-color: red;
text-align: center;
font-size: 20px;
} (a) purple (b) yellow (c) red -
30.🖌️ Where does the text sit on its line?
h1 {
text-align: right;
color: green;
background-color: purple;
font-size: 20px;
} (a) on the left (b) in the middle (c) on the right -
31.🖌️ Where does the text sit on its line?
h1 {
text-align: center;
background-color: white;
font-size: 36px;
color: red;
} (a) on the right (b) in the middle (c) on the left -
32.🖌️ What colour is behind the letters?
h1 {
font-size: 40px;
background-color: orange;
text-align: left;
color: green;
} (a) purple (b) orange (c) green -
33.🖌️ Where does the text sit on its line?
li {
font-size: 28px;
color: yellow;
text-align: left;
background-color: black;
} (a) on the left (b) in the middle (c) on the right -
34.🖌️ Where does the text sit on its line?
h2 {
color: yellow;
font-size: 16px;
background-color: blue;
text-align: left;
} (a) on the left (b) in the middle (c) on the right -
35.🖌️ Where does the text sit on its line?
h1 {
background-color: green;
color: red;
text-align: left;
font-size: 32px;
} (a) on the right (b) on the left (c) in the middle -
36.🖌️ What colour is behind the letters?
li {
color: orange;
background-color: red;
text-align: right;
font-size: 16px;
} (a) orange (b) yellow (c) red -
37.🖌️ What colour is behind the letters?
li {
background-color: red;
text-align: left;
font-size: 24px;
color: orange;
} (a) red (b) white (c) orange -
38.🖌️ How big is the text, in px?
li {
text-align: left;
color: yellow;
background-color: green;
font-size: 32px;
} - 39.🖌️ Which CSS property sets the letter colour? (a) font-weight (b) font-family (c) background-color (d) color
-
40.🖌️ What colour is behind the letters?
h1 {
color: blue;
font-size: 40px;
text-align: left;
background-color: green;
} (a) blue (b) green (c) yellow
Answer key
- 24
- red
- on the left
- makes letters bigger
- makes the text bold
- black
- on the right
- on the left
- on the right
- font-size
- on the left
- sets the letter colour
- picks the font style
- blue
- in the middle
- blue
- 12
- black
- orange
- font-family
- on the right
- 40
- red
- green
- purple
- on the right
- blue
- 12
- yellow
- on the right
- in the middle
- orange
- on the left
- on the left
- on the left
- red
- red
- 32
- color
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids