← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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