← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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