← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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