← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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