← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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