← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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