← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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