← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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