← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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