← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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