← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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