← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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