← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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