← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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