← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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