← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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