← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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