← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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