← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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