← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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