← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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