← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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