← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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