← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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