← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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