← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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