← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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