← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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