← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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