← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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