← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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