← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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