← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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