← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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