← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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