← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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