← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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