← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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