← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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