← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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