← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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