← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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