← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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