← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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