← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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