← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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