← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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