← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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