← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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