← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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