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