← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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