← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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