← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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