← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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