← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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