← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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