← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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