← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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