← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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