← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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