← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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