← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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