← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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