← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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