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