← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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