← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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