← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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