← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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