← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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