← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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