← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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