← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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