← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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