← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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