← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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