← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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