← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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