← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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