← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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