← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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