← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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