← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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