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