← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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