← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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