← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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