← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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