← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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