← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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