← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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