← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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