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