← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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