← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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