← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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