← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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