← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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