← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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