← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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