← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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