← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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