← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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