← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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