← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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