← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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