← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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