← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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