← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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