← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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