← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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