← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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