← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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