← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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