← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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