← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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