← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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