← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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