← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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