← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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