← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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