← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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