← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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