← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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