← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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