← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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