← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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