← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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