← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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