← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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