← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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