← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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