← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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