← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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