← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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