← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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