← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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