← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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