← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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