← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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