← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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