← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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