← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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