← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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