← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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