← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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