← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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