← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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