← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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