← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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