← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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