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