← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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