← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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