← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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