← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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