← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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