← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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