← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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