← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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