← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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