← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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