← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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