← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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