← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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