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