← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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