← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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