← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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