← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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