← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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