← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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