← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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