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