← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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