← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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