← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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