← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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