← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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