← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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