← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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