← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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