← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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