← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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