← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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