← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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