← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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