← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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