← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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