← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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