← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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