← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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