← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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