← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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