← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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