← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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