← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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