← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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