← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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