← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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