← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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