← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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