← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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