← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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