← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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