← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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