← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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