← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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