← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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