← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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