← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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