← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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