← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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