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