← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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