← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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