← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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