← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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