← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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