← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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