← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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