← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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