← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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