← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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