← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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