← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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