← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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