← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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