← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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