← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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