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