← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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