← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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