← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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