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