← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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