← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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