← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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