← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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