← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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