← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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