← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

HTML and CSS lesson 14: Colour and text properties · Set 859 · 40 questions
TalentJR

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

Answer key

  1. 24
  2. text-align
  3. makes the text bold
  4. white
  5. makes letters bigger
  6. red
  7. background-color
  8. font-size
  9. in the middle
  10. colours behind the text
  11. color
  12. 36
  13. 16
  14. in the middle
  15. red
  16. 12
  17. on the right
  18. 36
  19. 28
  20. on the right
  21. on the left
  22. white
  23. centres a heading
  24. 24
  25. on the left
  26. 16
  27. purple
  28. blue
  29. on the left
  30. yellow
  31. font-weight
  32. picks the font style
  33. 36
  34. 28
  35. yellow
  36. on the left
  37. 28
  38. 28
  39. on the right
  40. in the middle

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids