← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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