← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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