← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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