← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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