← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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