← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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