← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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