← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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