← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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