← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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