← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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