← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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