← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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