← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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