← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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