← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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