← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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