← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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