← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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