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