← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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