← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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