← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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