← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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