← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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