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