← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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