← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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