← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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