← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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