← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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