← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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