← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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