← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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