← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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