← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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