← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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