← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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