← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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