← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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