← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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