← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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