← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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