← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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