← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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