← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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