← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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