← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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