← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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