← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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