← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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