← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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