← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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