← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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