← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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