← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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