← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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