← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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